MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / main

Function main

scripts/run_skill_smoke.py:126–169  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

124
125
126def main() -> int:
127 with tempfile.TemporaryDirectory() as tmp_str:
128 tmp = Path(tmp_str)
129 _isolate_env(tmp)
130
131 # Reset every cache + register the bundled catalogue.
132 clear_skill_caches()
133 clear_dynamic_skills()
134 clear_skill_registry()
135 clear_bundled_skills()
136 init_bundled_skills()
137
138 project = _build_workspace(tmp)
139 ctx = ToolContext(workspace_root=project)
140 ctx.session_id = "S-smoke-001"
141
142 _print_listing(project)
143
144 _print_section("Invocations (first 200 chars of each rendered prompt)")
145 # commit-helper — substitutions + args
146 _print_invocation("commit-helper", "feat", ctx)
147
148 # frontend:add-component — namespaced + named arg
149 _print_invocation("frontend:add-component", "Button", ctx)
150
151 # simplify — bundled skill (no base-dir header)
152 _print_invocation("simplify", "focus on caching", ctx)
153
154 # lint-py — conditional skill: activate it by touching a
155 # matching path, then invoke. As of bug fix #14, activated
156 # conditional skills flow through `get_all_skills` →
157 # `_skill_registry` automatically, so SkillTool resolves them
158 # naturally on the next call (no manual registry promotion).
159 _print_section("Activating conditional `lint-py` for src/foo.py")
160 py_path = project / "src" / "foo.py"
161 py_path.parent.mkdir(parents=True, exist_ok=True)
162 py_path.write_text("# placeholder")
163 activated = activate_conditional_skills_for_paths(
164 [str(py_path)], str(project)
165 )
166 print(f" activated: {activated}")
167 _print_invocation("lint-py", "", ctx)
168
169 return 0
170
171
172if __name__ == "__main__":

Callers 1

run_skill_smoke.pyFile · 0.70

Calls 12

clear_skill_cachesFunction · 0.90
clear_dynamic_skillsFunction · 0.90
clear_skill_registryFunction · 0.90
clear_bundled_skillsFunction · 0.90
init_bundled_skillsFunction · 0.90
ToolContextClass · 0.90
_build_workspaceFunction · 0.85
_print_listingFunction · 0.85
_print_sectionFunction · 0.85
_print_invocationFunction · 0.85
_isolate_envFunction · 0.70

Tested by

no test coverage detected