Create Skills from Repo
Use this workflow to quickly ingest a framework or project's logic and documentation into the local environment. This is triggered when a user provides a <repo-url> and a <skills-name> for which no local skill yet exists.
🎯 Objectives
- Source Persistence: Keep the original repo in
sources/ for traceability and future updates.
- Knowledge Distillation: Convert dense documentation into agent-optimized
references/*.md (focusing on Usage and Why over Installation).
- Automatic Registration: Ensure the new skill is immediately discoverable via
AGENTS.md.
🛠 Prerequisites
- Validation: Ensure
<repo-url> is valid and <skills-name> uses kebab-case.
- Environment: Verify
git access and identify the project root.
🔄 Workflow
Step 1: Source Synchronization
- Define the destination:
sources/<submodule>.
- Sync Logic:
- Primary:
git submodule add <repo-url> sources/<submodule>
- Fallback: If the workspace is not a git repo, use
git clone --depth 1 <repo-url> sources/<submodule>
- Maintenance: If the directory exists but is empty, run
git submodule update --init.
Step 2: Identify Knowledge Base
- Locate Source Root: Scan
sources/<submodule>/ for docs/, wiki/, README.md, or packages/*/docs/.
- Filtering Strategy:
- ✅ Include: API references, core concepts, design patterns, best practices.
- ❌ Exclude: Installation guides (irrelevant to the Agent), contributing logs, sponsorship info, or marketing fluff.
Step 3: Modular Skill Generation
Target Structure: skills/<skills-name>/[SKILL.md, GENERATION.md, references/]
references/*.md Guidelines:
- Atomicity: One concept per file.
- Naming:
{category}-{concept}.md (e.g., core-reactivity.md).
- Content: Must include a
Frontmatter, a brief description, high-quality Code Snippets, and source URLs.
SKILL.md Indexing:
- Create a central entry point with tables categorizing references into
Core, Features, and Advanced.
GENERATION.md Metadata:
- Record the Git SHA, source path, and generation date for future diffing.
Step 4: The Coverage Loop
- Review: Compare the
Source Root navigation tree against the generated references/.
- Supplement: If major modules (e.g., Middleware, Auth, Error Handling) are missing, repeat Step 3 for those specific modules.
- Exit Condition: Stop once the primary API surface and architectural pillars are covered. Do not get bogged down in edge cases.
Step 5: Integration & Handover
- **Update
AGENTS.md**: Locate AGENTS.md in the project root (create it if missing).
- Inject Skill Entry:
### <skills-name>
- **Location**: `skills/<skills-name>/`
- **Description**: [Short description from SKILL.md]
- Completion Report: Summarize the output for the user (e.g., "Generated 15 reference files covering Core and Advanced modules").
💡 Key Principles
- Agent-Centric Writing: Write for an AI audience. Prioritize technical accuracy and code examples over prose.
- Kebab-Case: Strictly use
kebab-case for all directory and filenames.
- Path Formatting: Always use forward slashes (
/) for cross-platform compatibility.
- Incremental Readiness: The
sources/ clone should remain so that git diff can be used later to spot documentation changes.
📚 References
| Topic |
Description |
Reference |
| Coverage Criteria |
Definitions of "major modules" and stop conditions |
coverage-loop |
| Style Guide |
Detailed writing style for reference files |
style-guide |
Would you like me to simulate a run of this skill using a specific repository URL to show you the expected output?
1---2name: create-skill-from-repo3description: Bootstraps modular Agent Skills from any repository. Clones the source to `sources/`, extracts core documentation into categorized references under `skills/`, and registers the output in the workspace `AGENTS.md`.4---5
6# Create Skills from Repo
7
8Use this workflow to quickly ingest a framework or project's logic and documentation into the local environment. This is triggered when a user provides a `<repo-url>` and a `<skills-name>` for which no local skill yet exists.
9
10## 🎯 Objectives
11
121. **Source Persistence**: Keep the original repo in `sources/` for traceability and future updates.
132. **Knowledge Distillation**: Convert dense documentation into agent-optimized `references/*.md` (focusing on *Usage* and *Why* over *Installation*).
143. **Automatic Registration**: Ensure the new skill is immediately discoverable via `AGENTS.md`.
15
16---
17
18## 🛠 Prerequisites
19
20* **Validation**: Ensure `<repo-url>` is valid and `<skills-name>` uses kebab-case.
21* **Environment**: Verify `git` access and identify the project root.
22
23---
24
25## 🔄 Workflow
26
27### Step 1: Source Synchronization
28
291. Define the destination: `sources/<submodule>`.
302. **Sync Logic**:
31* **Primary**: `git submodule add <repo-url> sources/<submodule>`
32* **Fallback**: If the workspace is not a git repo, use `git clone --depth 1 <repo-url> sources/<submodule>`
33* **Maintenance**: If the directory exists but is empty, run `git submodule update --init`.
34
35
36
37### Step 2: Identify Knowledge Base
38
391. **Locate Source Root**: Scan `sources/<submodule>/` for `docs/`, `wiki/`, `README.md`, or `packages/*/docs/`.
402. **Filtering Strategy**:
41* ✅ **Include**: API references, core concepts, design patterns, best practices.
42* ❌ **Exclude**: Installation guides (irrelevant to the Agent), contributing logs, sponsorship info, or marketing fluff.
43
44
45
46### Step 3: Modular Skill Generation
47
48> **Target Structure**: `skills/<skills-name>/[SKILL.md, GENERATION.md, references/]`
49
501. **`references/*.md` Guidelines**:
51* **Atomicity**: One concept per file.
52* **Naming**: `{category}-{concept}.md` (e.g., `core-reactivity.md`).
53* **Content**: Must include a `Frontmatter`, a brief description, high-quality **Code Snippets**, and source URLs.
54
55
562. **`SKILL.md` Indexing**:
57* Create a central entry point with tables categorizing references into `Core`, `Features`, and `Advanced`.
58
59
603. **`GENERATION.md` Metadata**:
61* Record the Git SHA, source path, and generation date for future diffing.
62
63
64
65### Step 4: The Coverage Loop
66
671. **Review**: Compare the `Source Root` navigation tree against the generated `references/`.
682. **Supplement**: If major modules (e.g., Middleware, Auth, Error Handling) are missing, repeat Step 3 for those specific modules.
693. **Exit Condition**: Stop once the primary API surface and architectural pillars are covered. Do not get bogged down in edge cases.
70
71### Step 5: Integration & Handover
72
731. **Update `AGENTS.md**`: Locate `AGENTS.md` in the project root (create it if missing).
742. **Inject Skill Entry**:
75```markdown
76### <skills-name>
77- **Location**: `skills/<skills-name>/`
78- **Description**: [Short description from SKILL.md]
79
80```
81
82
833. **Completion Report**: Summarize the output for the user (e.g., "Generated 15 reference files covering Core and Advanced modules").
84
85---
86
87## 💡 Key Principles
88
89* **Agent-Centric Writing**: Write for an AI audience. Prioritize technical accuracy and code examples over prose.
90* **Kebab-Case**: Strictly use `kebab-case` for all directory and filenames.
91* **Path Formatting**: Always use forward slashes (`/`) for cross-platform compatibility.
92* **Incremental Readiness**: The `sources/` clone should remain so that `git diff` can be used later to spot documentation changes.
93
94---
95
96## 📚 References
97
98| Topic | Description | Reference |
99| --- | --- | --- |
100| **Coverage Criteria** | Definitions of "major modules" and stop conditions | [coverage-loop](references/coverage-loop.md) |
101| **Style Guide** | Detailed writing style for reference files | [style-guide](references/style-guide.md) |
102
103---
104
105**Would you like me to simulate a run of this skill using a specific repository URL to show you the expected output?**