create-skills-from-repo
SKILL.md
Create Skills from Repo
Workflow for quickly producing a skill set from any repository and applying it in the project. Use when the user supplies <repo-url> and <skills-name> and there is no existing skill source for that framework or project (i.e. not in meta.ts submodules or vendors).
When to Use
- User provides a repository URL and a desired skills name.
- No entry exists in
meta.tssubmodules or vendors for that project. - Goal is to bootstrap skills from docs/source in this repo (output under
skills/).
Prerequisites
- User has given:
<repo-url>(e.g.https://github.com/org/repo) and<skills-name>(kebab-case, e.g.my-framework). - Workspace is the skills generator repo (contains
meta.ts,skills/).
Workflow
Copy this checklist and track progress:
Task Progress:
- [ ] Step 1: Clone repo to .temp/repos
- [ ] Step 2: Identify docs/source in clone
- [ ] Step 3: Generate initial skill set (SKILL.md + references)
- [ ] Step 4: Loop — review coverage, add missing major modules
- [ ] Step 5: Add generated skills to user's AGENTS.md (create file if missing)
- [ ] Step 6: Remove .temp/repos and inform user
Step 1: Clone repo to .temp/repos
- Create
.temp/reposif it does not exist. - Derive a slug from the repo URL (e.g.
github.com/org/repo→org-repoor last path segmentrepo). Use a single, consistent folder name to avoid collisions. - Clone shallow into
.temp/repos/<slug>:git clone --depth 1 <repo-url> .temp/repos/<slug> - Do not add the clone to
meta.tssubmodules; this is a one-off temp source.
Step 2: Identify docs/source in clone
- Locate documentation in the cloned repo. Common paths:
docs/,documentation/,packages/*/docs/, or repo root with README + MD files. - Treat this path as the source root for reading (equivalent to
sources/{project}/docs/in a Type 1 workflow). - If the skills repo has
instructions/<project>.mdfor this project, follow it; otherwise focus on agent capabilities and practical usage; categorize references ascore,features,best-practices,advancedand prefix filenames accordingly; skip user-facing guides, get-started, and content agents already know.
Step 3: Generate initial skill set
- Output directory:
skills/<skills-name>/. Create it if needed. Structure:SKILL.md,references/*.md,GENERATION.md; optionalscripts/,assets/. - Read from the source root in
.temp/repos/<slug>: structure, main topics, and entry points (README, sidebar, nav). - Create:
skills/<skills-name>/SKILL.md— Frontmatter:name,description,metadata(author, version, source). Body: short intro, then sections with tables of references (e.g. Core References, Features). Use kebab-case for names. Seeskills/pinia/SKILL.mdorskills/slidev/SKILL.mdfor examples.skills/<skills-name>/references/*.md— One concept per file; filename prefix by category (core-*,features-*,best-practices-*,advanced-*). Each file: frontmattername,description; heading; brief description; Usage (code examples); Key Points (bullets); at the end a comment block<!-- Source references: ... -->with URLs to the source docs.skills/<skills-name>/GENERATION.md— Tracking metadata:# Generation Info - **Source:** `.temp/repos/<slug>` (one-off clone of <repo-url>) - **Git SHA:** <sha> - **Generated:** <date>
- Writing: Rewrite for agents; be practical and concise; one concept per file; include working code examples; explain when and why, not only how. Do not copy docs verbatim.
Step 4: Loop until no major modules missing
Review, identify missing modules, supplement, update SKILL.md (and GENERATION.md if re-read). The “source” is the temp clone’s docs.
- Review — Compare
skills/<skills-name>/references/andSKILL.mdto the repo’s documented surface (docs tree, README, nav). - Identify — Missing major modules: central or commonly needed topics (core concepts, main APIs, primary features), not minor edge cases. Criteria: see coverage-loop.
- Supplement — Add new reference files in
skills/<skills-name>/references/with correct naming (core-*,features-*, etc.); updateSKILL.mdtables; updateGENERATION.mdif the source was re-read. - Repeat until no important gaps remain (do not skip the review; stop when major surface is covered).
Step 5: Add generated skills to user's AGENTS.md (create file if missing)
User's project = the workspace where the agent is running (repository root). User's AGENTS.md = AGENTS.md at that root.
- If
AGENTS.mddoes not exist in the user's project root, create it (e.g. a short intro and a section for skills). - Add the generated skills to
AGENTS.md. Include at least:- The skill name:
<skills-name> - Where it lives:
skills/<skills-name>/(or the path relative to the user's project) - Optionally: a one-line description or when to use it (from
skills/<skills-name>/SKILL.mdfrontmatter).
- The skill name:
- Place the addition in a clear section (e.g. "Generated skills", "Agent skills", "Skills from repo"). If the file already lists skills, append or merge in the same format; do not remove existing content.
Step 6: Remove .temp/repos and inform user
- Delete the temp clone:
Ifrm -rf .temp/repos/<slug>.temp/reposis empty, you may remove.temp/reposas well (or leave it for future runs). - Tell the user that the skill set is ready: output is under
skills/<skills-name>/, the user'sAGENTS.mdhas been updated with the new skill, and they can use or extend it from there. Optionally summarize what was created (SKILL.md + N references).
Key Points
- Temp only: The clone in
.temp/reposis temporary; do not add it tometa.ts. The canonical source is the user’s<repo-url>; record it inGENERATION.md. - One skill set per run: One
<repo-url>+<skills-name>produces one directory underskills/<skills-name>/. - User's AGENTS.md: Always add the generated skill to the user's project root
AGENTS.md(create the file if it does not exist). We only register our output there; we do not require the user to follow any other project's rules. - Naming: Use kebab-case for
<skills-name>and for reference filenames (e.g.core-syntax.md,features-routing.md). - No Windows paths: Use forward slashes in instructions and examples (e.g.
.temp/repos/slug).
References
| Topic | Description | Reference |
|---|---|---|
| Coverage loop | When to stop the loop and what counts as a major module | coverage-loop |
Additional Resources
- Coverage criteria and when to stop the loop: coverage-loop.