Skip to content

"CLI-Anything: Making ALL Software Agent-Native" -- CLI-Hub: https://clianything.cc/

Python

refactor: move SKILL.md inside Python package for pip install support

yuhao1db162215611
diff --git a/README.md b/README.md
index 9008f57d9..294eb7ed0 100644
--- a/README.md
+++ b/README.md
@@ -370,7 +370,7 @@ All CLIs organized under cli_anything.* namespace β€” conflict-free, pip-install
### πŸ€– SKILL.md Generation
-Each generated CLI includes a `SKILL.md` file at `<software>/agent-harness/skills/SKILL.md` β€” a self-contained skill definition that enables AI agents to discover and use the CLI through Claude Code's skill system or other agent frameworks.
+Each generated CLI includes a `SKILL.md` file inside the Python package at `cli_anything/<software>/skills/SKILL.md`. This self-contained skill definition enables AI agents to discover and use the CLI through Claude Code's skill system or other agent frameworks.
**What SKILL.md provides:**
- **YAML frontmatter** with name and description for agent skill discovery
@@ -378,7 +378,7 @@ Each generated CLI includes a `SKILL.md` file at `<software>/agent-harness/skill
- **Usage examples** for common workflows
- **Agent-specific guidance** for JSON output, error handling, and programmatic use
-SKILL.md files are auto-generated during Phase 6.5 of the pipeline using `skill_generator.py`, which extracts metadata directly from the CLI's Click decorators, setup.py, and README.
+SKILL.md files are auto-generated during Phase 6.5 of the pipeline using `skill_generator.py`, which extracts metadata directly from the CLI's Click decorators, setup.py, and README. Because the file lives inside the package, it is installed alongside the CLI via `pip install` and auto-detected by the REPL banner β€” agents can read the absolute path displayed at startup.
---
diff --git a/anygen/agent-harness/skills/SKILL.md b/anygen/agent-harness/cli_anything/anygen/skills/SKILL.md
similarity index 100%
rename from anygen/agent-harness/skills/SKILL.md
rename to anygen/agent-harness/cli_anything/anygen/skills/SKILL.md
diff --git a/anygen/agent-harness/setup.py b/anygen/agent-harness/setup.py
index 3a540109b..33d85e36f 100644
--- a/anygen/agent-harness/setup.py
+++ b/anygen/agent-harness/setup.py
@@ -49,6 +49,9 @@ setup(
"cli-anything-anygen=cli_anything.anygen.anygen_cli:main",
],
},
+ package_data={
+ "cli_anything.anygen": ["skills/*.md"],
+ },
include_package_data=True,
zip_safe=False,
)
diff --git a/audacity/agent-harness/skills/SKILL.md b/audacity/agent-harness/cli_anything/audacity/skills/SKILL.md
similarity index 100%
rename from audacity/agent-harness/skills/SKILL.md
rename to audacity/agent-harness/cli_anything/audacity/skills/SKILL.md
diff --git a/audacity/agent-harness/setup.py b/audacity/agent-harness/setup.py
index aff4f4d53..c187a50e5 100644
--- a/audacity/agent-harness/setup.py
+++ b/audacity/agent-harness/setup.py
@@ -49,6 +49,9 @@ setup(
"cli-anything-audacity=cli_anything.audacity.audacity_cli:main",
],
},
+ package_data={
+ "cli_anything.audacity": ["skills/*.md"],
+ },
include_package_data=True,
zip_safe=False,
)
diff --git a/blender/agent-harness/skills/SKILL.md b/blender/agent-harness/cli_anything/blender/skills/SKILL.md
similarity index 100%
rename from blender/agent-harness/skills/SKILL.md
rename to blender/agent-harness/cli_anything/blender/skills/SKILL.md
diff --git a/blender/agent-harness/setup.py b/blender/agent-harness/setup.py
index 02cfc6cc2..489268833 100644
--- a/blender/agent-harness/setup.py
+++ b/blender/agent-harness/setup.py
@@ -48,6 +48,9 @@ setup(
"cli-anything-blender=cli_anything.blender.blender_cli:main",
],
},
+ package_data={
+ "cli_anything.blender": ["skills/*.md"],
+ },
include_package_data=True,
zip_safe=False,
)
diff --git a/cli-anything-plugin/HARNESS.md b/cli-anything-plugin/HARNESS.md
index 158b5088c..e2124fcf5 100644
--- a/cli-anything-plugin/HARNESS.md
+++ b/cli-anything-plugin/HARNESS.md
@@ -74,8 +74,8 @@ designed for humans, without needing a display or mouse.
```python
from cli_anything.<software>.utils.repl_skin import ReplSkin
- skin = ReplSkin("<software>", version="1.0.0", skill_path="skills/SKILL.md")
- skin.print_banner() # Branded startup box (includes skill path for agents)
+ skin = ReplSkin("<software>", version="1.0.0")
+ skin.print_banner() # Branded startup box (auto-detects skills/SKILL.md)
pt_session = skin.create_prompt_session() # prompt_toolkit with history + styling
line = skin.get_input(pt_session, project_name="my_project", modified=True)
skin.help(commands_dict) # Formatted help listing
@@ -88,8 +88,8 @@ designed for humans, without needing a display or mouse.
skin.progress(3, 10, "...") # Progress bar
skin.print_goodbye() # Styled exit message
```
- - **Important**: Include `skill_path` parameter to display the SKILL.md location in the
- banner. This allows AI agents to discover where to read the skill documentation.
+ - ReplSkin auto-detects `skills/SKILL.md` inside the package directory and displays
+ it in the banner. AI agents can read the skill file at the displayed absolute path.
- Make REPL the default behavior: use `invoke_without_command=True` on the main
Click group, and invoke the `repl` command when no subcommand is given:
```python
@@ -259,9 +259,9 @@ definition that can be loaded by Claude Code or other AI assistants.
from skill_generator import generate_skill_file
skill_path = generate_skill_file(
- harness_path="/path/to/agent-harness",
- output_path="skills/SKILL.md"
+ harness_path="/path/to/agent-harness"
)
+ # Default output: cli_anything/<software>/skills/SKILL.md
```
2. **The generator automatically extracts:**
@@ -277,19 +277,21 @@ definition that can be loaded by Claude Code or other AI assistants.
**Output Location:**
-By default, SKILL.md files are generated in the `skills/` directory:
+SKILL.md is generated inside the Python package so it is installed with `pip install`:
```
<software>/
└── agent-harness/
- └── skills/
- └── SKILL.md
+ └── cli_anything/
+ └── <software>/
+ └── skills/
+ └── SKILL.md
```
**Manual Generation:**
```bash
cd cli-anything-plugin
-python skill_generator.py /path/to/software/agent-harness -o skills/SKILL.md
+python skill_generator.py /path/to/software/agent-harness
```
**Integration with CLI Build:**
@@ -306,22 +308,28 @@ skill definition.
- List all command groups with brief descriptions
- Provide realistic examples that demonstrate common workflows
-**Display Skill Path in CLI Banner:**
+**Skill Path in CLI Banner:**
-After generating SKILL.md, update the CLI's REPL initialization to display the skill
-path in the startup banner. This helps AI agents discover where to read the skill
-documentation when using the CLI:
+ReplSkin auto-detects `skills/SKILL.md` inside the package and displays the absolute
+path in the startup banner. AI agents can read the file at the displayed path:
```python
# In the REPL initialization (e.g., shotcut_cli.py)
from cli_anything.<software>.utils.repl_skin import ReplSkin
-skin = ReplSkin("<software>", version="1.0.0", skill_path="skills/SKILL.md")
-skin.print_banner() # Now displays: β—‡ Skill: skills/SKILL.md
+skin = ReplSkin("<software>", version="1.0.0")
+skin.print_banner() # Auto-detects and displays: β—‡ Skill: /path/to/cli_anything/<software>/skills/SKILL.md
```
-This enables agents to know exactly where to find the skill definition when they
-encounter the CLI.
+**Package Data:**
+
+Ensure `setup.py` includes the skill file as package data so it is installed with pip:
+
+```python
+package_data={
+ "cli_anything.<software>": ["skills/*.md"],
+},
+```
## Critical Lessons Learned
diff --git a/cli-anything-plugin/README.md b/cli-anything-plugin/README.md
index 233c8c73b..137367c16 100644
--- a/cli-anything-plugin/README.md
+++ b/cli-anything-plugin/README.md
@@ -216,7 +216,7 @@ Generate AI-discoverable skill definition:
- Extract CLI metadata using `skill_generator.py`
- Generate SKILL.md with YAML frontmatter (name, description)
- Include command groups, examples, and agent-specific guidance
-- Output to `skills/SKILL.md`
+- Output to `cli_anything/<software>/skills/SKILL.md` (inside the Python package)
**Output:** SKILL.md file for AI agent discovery
@@ -238,8 +238,6 @@ Package and install:
└── agent-harness/
β”œβ”€β”€ <SOFTWARE>.md # Software-specific SOP
β”œβ”€β”€ setup.py # PyPI config (find_namespace_packages)
- β”œβ”€β”€ skills/ # Generated skill definitions
- β”‚ └── SKILL.md # AI-discoverable skill file
└── cli_anything/ # Namespace package (NO __init__.py)
└── <software>/ # Sub-package (HAS __init__.py)
β”œβ”€β”€ README.md # Installation and usage
@@ -252,6 +250,8 @@ Package and install:
β”‚ β”œβ”€β”€ session.py # Undo/redo
β”‚ β”œβ”€β”€ export.py # Rendering/export
β”‚ └── ... # Domain-specific modules
+ β”œβ”€β”€ skills/ # AI-discoverable skill definition
+ β”‚ └── SKILL.md # Installed with the package via package_data
β”œβ”€β”€ utils/ # Utilities
β”‚ β”œβ”€β”€ __init__.py
β”‚ β”œβ”€β”€ repl_skin.py # Unified REPL skin (copy from plugin)
diff --git a/cli-anything-plugin/commands/cli-anything.md b/cli-anything-plugin/commands/cli-anything.md
index a0772d12c..97f0763a6 100644
--- a/cli-anything-plugin/commands/cli-anything.md
+++ b/cli-anything-plugin/commands/cli-anything.md
@@ -73,7 +73,7 @@ This command implements the complete cli-anything methodology to build a product
- Extracts CLI metadata using `skill_generator.py`
- Generates SKILL.md with YAML frontmatter and Markdown body
- Includes command groups, examples, and agent-specific guidance
-- Outputs to `skills/SKILL.md` by default
+- Outputs to `cli_anything/<software>/skills/SKILL.md` inside the Python package
- Makes the CLI discoverable and usable by AI agents
### Phase 7: PyPI Publishing and Installation
@@ -100,6 +100,8 @@ This command implements the complete cli-anything methodology to build a product
β”‚ β”œβ”€β”€ session.py
β”‚ β”œβ”€β”€ export.py
β”‚ └── ...
+ β”œβ”€β”€ skills/
+ β”‚ └── SKILL.md # AI-discoverable skill definition
β”œβ”€β”€ utils/ # Utilities
└── tests/
β”œβ”€β”€ TEST.md # Test plan and results
diff --git a/cli-anything-plugin/repl_skin.py b/cli-anything-plugin/repl_skin.py
index 7a245e9f5..c7312348a 100644
--- a/cli-anything-plugin/repl_skin.py
+++ b/cli-anything-plugin/repl_skin.py
@@ -6,8 +6,8 @@ Copy this file into your CLI package at:
Usage:
from cli_anything.<software>.utils.repl_skin import ReplSkin
- skin = ReplSkin("shotcut", version="1.0.0", skill_path="skills/SKILL.md")
- skin.print_banner()
+ skin = ReplSkin("shotcut", version="1.0.0")
+ skin.print_banner() # auto-detects skills/SKILL.md inside the package
prompt_text = skin.prompt(project_name="my_video.mlt", modified=True)
skin.success("Project saved")
skin.error("File not found")
@@ -106,11 +106,21 @@ class ReplSkin:
history_file: Path for persistent command history.
Defaults to ~/.cli-anything-<software>/history
skill_path: Path to the SKILL.md file for agent discovery.
+ Auto-detected from the package's skills/ directory if not provided.
Displayed in banner for AI agents to know where to read skill info.
"""
self.software = software.lower().replace("-", "_")
self.display_name = software.replace("_", " ").title()
self.version = version
+
+ # Auto-detect skill path from package layout:
+ # cli_anything/<software>/utils/repl_skin.py (this file)
+ # cli_anything/<software>/skills/SKILL.md (target)
+ if skill_path is None:
+ from pathlib import Path
+ _auto = Path(__file__).resolve().parent.parent / "skills" / "SKILL.md"
+ if _auto.is_file():
+ skill_path = str(_auto)
self.skill_path = skill_path
self.accent = _ACCENT_COLORS.get(self.software, _DEFAULT_ACCENT)
diff --git a/cli-anything-plugin/skill_generator.py b/cli-anything-plugin/skill_generator.py
index a15705578..ecf14c089 100644
--- a/cli-anything-plugin/skill_generator.py
+++ b/cli-anything-plugin/skill_generator.py
@@ -465,7 +465,7 @@ def generate_skill_file(harness_path: str, output_path: Optional[str] = None,
Args:
harness_path: Path to the agent-harness directory
- output_path: Optional output path for SKILL.md (default: skills/SKILL.md)
+ output_path: Optional output path for SKILL.md (default: cli_anything/<software>/skills/SKILL.md)
template_path: Optional path to custom Jinja2 template
Returns:
@@ -481,7 +481,7 @@ def generate_skill_file(harness_path: str, output_path: Optional[str] = None,
if output_path is None:
# Default to skills/ directory under harness_path
harness_path_obj = Path(harness_path)
- output_path = harness_path_obj / "skills" / "SKILL.md"
+ output_path = harness_path_obj / "cli_anything" / metadata.software_name / "skills" / "SKILL.md"
else:
output_path = Path(output_path)
@@ -507,7 +507,7 @@ if __name__ == "__main__":
)
parser.add_argument(
"-o", "--output",
- help="Output path for SKILL.md (default: skills/SKILL.md)",
+ help="Output path for SKILL.md (default: cli_anything/<software>/skills/SKILL.md)",
default=None
)
parser.add_argument(
diff --git a/drawio/agent-harness/skills/SKILL.md b/drawio/agent-harness/cli_anything/drawio/skills/SKILL.md
similarity index 100%
rename from drawio/agent-harness/skills/SKILL.md
rename to drawio/agent-harness/cli_anything/drawio/skills/SKILL.md
diff --git a/drawio/agent-harness/setup.py b/drawio/agent-harness/setup.py
index ad158910a..976d158ec 100644
--- a/drawio/agent-harness/setup.py
+++ b/drawio/agent-harness/setup.py
@@ -48,6 +48,9 @@ setup(
"cli-anything-drawio=cli_anything.drawio.drawio_cli:cli",
],
},
+ package_data={
+ "cli_anything.drawio": ["skills/*.md"],
+ },
include_package_data=True,
zip_safe=False,
)
diff --git a/gimp/agent-harness/skills/SKILL.md b/gimp/agent-harness/cli_anything/gimp/skills/SKILL.md
similarity index 100%
rename from gimp/agent-harness/skills/SKILL.md
rename to gimp/agent-harness/cli_anything/gimp/skills/SKILL.md
diff --git a/gimp/agent-harness/setup.py b/gimp/agent-harness/setup.py
index 510462981..6b50463cb 100644
--- a/gimp/agent-harness/setup.py
+++ b/gimp/agent-harness/setup.py
@@ -49,6 +49,9 @@ setup(
"cli-anything-gimp=cli_anything.gimp.gimp_cli:main",
],
},
+ package_data={
+ "cli_anything.gimp": ["skills/*.md"],
+ },
include_package_data=True,
zip_safe=False,
)
diff --git a/inkscape/agent-harness/skills/SKILL.md b/inkscape/agent-harness/cli_anything/inkscape/skills/SKILL.md
similarity index 100%
rename from inkscape/agent-harness/skills/SKILL.md
rename to inkscape/agent-harness/cli_anything/inkscape/skills/SKILL.md
diff --git a/inkscape/agent-harness/setup.py b/inkscape/agent-harness/setup.py
index d451725c9..2733f8932 100644
--- a/inkscape/agent-harness/setup.py
+++ b/inkscape/agent-harness/setup.py
@@ -48,6 +48,9 @@ setup(
"cli-anything-inkscape=cli_anything.inkscape.inkscape_cli:main",
],
},
+ package_data={
+ "cli_anything.inkscape": ["skills/*.md"],
+ },
include_package_data=True,
zip_safe=False,
)
diff --git a/kdenlive/agent-harness/skills/SKILL.md b/kdenlive/agent-harness/cli_anything/kdenlive/skills/SKILL.md
similarity index 100%
rename from kdenlive/agent-harness/skills/SKILL.md
rename to kdenlive/agent-harness/cli_anything/kdenlive/skills/SKILL.md
diff --git a/kdenlive/agent-harness/setup.py b/kdenlive/agent-harness/setup.py
index be10af574..58966d605 100644
--- a/kdenlive/agent-harness/setup.py
+++ b/kdenlive/agent-harness/setup.py
@@ -48,6 +48,9 @@ setup(
"cli-anything-kdenlive=cli_anything.kdenlive.kdenlive_cli:main",
],
},
+ package_data={
+ "cli_anything.kdenlive": ["skills/*.md"],
+ },
include_package_data=True,
zip_safe=False,
)
diff --git a/libreoffice/agent-harness/skills/SKILL.md b/libreoffice/agent-harness/cli_anything/libreoffice/skills/SKILL.md
similarity index 100%
rename from libreoffice/agent-harness/skills/SKILL.md
rename to libreoffice/agent-harness/cli_anything/libreoffice/skills/SKILL.md
diff --git a/libreoffice/agent-harness/setup.py b/libreoffice/agent-harness/setup.py
index 05734216d..e5a85600f 100644
--- a/libreoffice/agent-harness/setup.py
+++ b/libreoffice/agent-harness/setup.py
@@ -48,6 +48,9 @@ setup(
"cli-anything-libreoffice=cli_anything.libreoffice.libreoffice_cli:main",
],
},
+ package_data={
+ "cli_anything.libreoffice": ["skills/*.md"],
+ },
include_package_data=True,
zip_safe=False,
)
diff --git a/obs-studio/agent-harness/skills/SKILL.md b/obs-studio/agent-harness/cli_anything/obs_studio/skills/SKILL.md
similarity index 100%
rename from obs-studio/agent-harness/skills/SKILL.md
rename to obs-studio/agent-harness/cli_anything/obs_studio/skills/SKILL.md
diff --git a/obs-studio/agent-harness/setup.py b/obs-studio/agent-harness/setup.py
index bf1b517c4..29fe8a879 100644
--- a/obs-studio/agent-harness/setup.py
+++ b/obs-studio/agent-harness/setup.py
@@ -48,6 +48,9 @@ setup(
"cli-anything-obs-studio=cli_anything.obs_studio.obs_studio_cli:main",
],
},
+ package_data={
+ "cli_anything.obs_studio": ["skills/*.md"],
+ },
include_package_data=True,
zip_safe=False,
)
diff --git a/shotcut/agent-harness/skills/SKILL.md b/shotcut/agent-harness/cli_anything/shotcut/skills/SKILL.md
similarity index 100%
rename from shotcut/agent-harness/skills/SKILL.md
rename to shotcut/agent-harness/cli_anything/shotcut/skills/SKILL.md
diff --git a/shotcut/agent-harness/setup.py b/shotcut/agent-harness/setup.py
index c92c00358..2d9f5d5b8 100644
--- a/shotcut/agent-harness/setup.py
+++ b/shotcut/agent-harness/setup.py
@@ -49,6 +49,9 @@ setup(
"cli-anything-shotcut=cli_anything.shotcut.shotcut_cli:cli",
],
},
+ package_data={
+ "cli_anything.shotcut": ["skills/*.md"],
+ },
include_package_data=True,
zip_safe=False,
)
diff --git a/zoom/agent-harness/skills/SKILL.md b/zoom/agent-harness/cli_anything/zoom/skills/SKILL.md
similarity index 100%
rename from zoom/agent-harness/skills/SKILL.md
rename to zoom/agent-harness/cli_anything/zoom/skills/SKILL.md
diff --git a/zoom/agent-harness/setup.py b/zoom/agent-harness/setup.py
index 827790879..a288996f3 100644
--- a/zoom/agent-harness/setup.py
+++ b/zoom/agent-harness/setup.py
@@ -47,6 +47,9 @@ setup(
"cli-anything-zoom=cli_anything.zoom.zoom_cli:main",
],
},
+ package_data={
+ "cli_anything.zoom": ["skills/*.md"],
+ },
include_package_data=True,
zip_safe=False,
)