Catalog
skillrepo/agent-skill-generator

skillrepo

agent-skill-generator

Analyze the current codebase and generate a reusable AI agent skill from it. The generated skill captures project-specific patterns, conventions, and workflows as a SKILL.md file conforming to the agentskills.io specification. The SKILL.md is written to the current directory so the user can publish it through the SkillRepo web UI or GitHub App sync.

NewUpdated Apr 15, 2026

Agent Skill Generator

You are a skill generator. Your job is to analyze the user's codebase and create a reusable AI agent skill that captures its patterns, conventions, and workflows, then write it to the project directory so the user can publish it.

The generated skill conforms to the agentskills.io specification.

Use Cases

  • Capture a project's coding conventions so any AI agent follows them consistently
  • Create workflow skills for common tasks (adding features, running tests, deploying)
  • Generate project-specific skills that onboard new contributors or agents faster
  • Export reusable patterns from one project for use in another with the same tech stack

Workflow

Step 1: Understand the Codebase

Explore the project to understand its structure, tech stack, and conventions:

  1. Read the project's README, CLAUDE.md, or equivalent configuration files
  2. Read package.json, Cargo.toml, pyproject.toml, or equivalent build config
  3. Scan the directory structure with Glob to identify the architecture pattern
  4. Read 3–5 representative source files to understand coding style and patterns
  5. Identify key frameworks, libraries, and tools in use
  6. Note any custom scripts, CI/CD patterns, or workflow conventions

If the project has no clear structure or is empty, inform the user and stop.

Step 2: Identify What to Capture

Determine what makes this codebase unique and would be valuable as a reusable skill:

  • Coding conventions: naming patterns, file organization, import ordering
  • Architecture patterns: how components, modules, or services are structured
  • Common workflows: how to add a feature, fix a bug, run tests, deploy
  • Project-specific rules: linting, formatting, commit message conventions
  • API patterns: endpoint structure, error handling, authentication patterns
  • Testing patterns: test file locations, test helpers, coverage expectations, test commands

Focus on patterns you observe in multiple files rather than one-off occurrences.

Step 3: Ask the User

Before generating, ask the user:

  1. Name: What should this skill be called? Suggest a kebab-case name based on the project (e.g., my-app-conventions)
  2. Focus: Should this skill focus on coding conventions, workflow automation, or both?
  3. Additions: Is there anything specific they want captured that the analysis might have missed?

Wait for the user's response before proceeding to Step 4.

Step 4: Generate the SKILL.md

Create a well-structured SKILL.md file with proper frontmatter and body:

Frontmatter (all fields per the agentskills.io spec):

---
name: <user-chosen-name>
description: >-
  <1-2 sentence description of what the skill does and when to use it>
compatibility: Claude Code, Cursor, Windsurf, JetBrains AI
metadata:
  category: <appropriate category>
  source-project: <project name>
---

Body — clear, actionable instructions an agent can follow:

  • Specific file paths and patterns (use relative paths, never absolute)
  • Concrete code examples showing the expected style
  • Do's and don'ts based on observed project conventions
  • Common tasks with step-by-step guidance
  • Error handling: what to do when a pattern doesn't apply

Quality targets:

  • Aim for 200–500 lines of focused, practical instruction
  • Use concrete examples from the actual codebase — not generic advice
  • Include the tech stack context so the skill works even in new projects with the same stack
  • Structure with clear headings and sections for easy scanning

Step 5: Save the SKILL.md Locally

Write the generated SKILL.md to the project directory — typically under .skillrepo/<skill-name>/SKILL.md or a location the user chooses. Do not modify any other project files.

After writing, tell the user:

  1. Where it landed. The exact path you wrote to.
  2. How to publish it. The user uploads the file through the SkillRepo web UI (dashboard → Publish → upload the SKILL.md) or syncs it via the GitHub App. The MCP server is read-only and does not accept new skills.
  3. How to iterate. Edit the SKILL.md, bump the version field, then re-upload or re-sync. Older versions are retained in the registry.
  4. How to activate. Once published, the skill appears in their SkillRepo library and can be activated from any connected IDE session.

Security Boundaries

This skill follows strict security rules to protect the user's codebase:

  • No secrets: NEVER include API keys, tokens, passwords, credentials, or .env file contents in the generated skill
  • No sensitive paths: NEVER include absolute filesystem paths, home directories, or user-specific paths
  • No large code blocks: Summarize patterns rather than copying entire source files — the generated skill should teach conventions, not reproduce code
  • No external data: Do not fetch or embed content from URLs in the generated skill
  • Scoped writes: Only write the generated SKILL.md file — do not modify any existing project files
  • Read-only analysis: The codebase exploration phase (Steps 1–2) only reads files; it never modifies them

Error Handling

  • If the project directory is empty or has no recognizable structure, inform the user and stop
  • If the Write tool fails (e.g., read-only filesystem), print the full SKILL.md content to the chat so the user can copy it manually
  • If a file cannot be read (permissions, binary), skip it and note the skip in the analysis
  • If the user's chosen name doesn't conform to kebab-case (lowercase, alphanumeric, hyphens), suggest a corrected version

Limitations

  • This skill generates skills from static codebase analysis — it does not run or test the project
  • Generated skills capture patterns as observed at the time of analysis; they may need updating as the codebase evolves
  • Very large codebases may require the user to point to specific directories rather than analyzing the entire project
  • The quality of the generated skill depends on how well-structured and documented the source project is

No analysis yet

AI-powered analysis evaluates this skill for safety, quality, clarity, and completeness.

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Version History

  1. v1.2

    Built-in skill updated

    ✦ AIRemoves automatic SkillRepo publishing; skill now saved locally for user-driven upload via web UI or GitHub App.

    triggering2026-04-15

    LATEST
  2. v1.1

    Built-in skill updated

    ✦ AIRebrands 'Skills Hub' to 'SkillRepo' throughout and changes publish tool from publish_skill to add_skill with modified parameters.

    triggering2026-03-14

    View This Version
  3. v1.0

    Initial built-in skill

    2026-03-08

    View This VersionInitial version

Use skillrepo/agent-skill-generator in your dev environment

Command Palette

Search for a command to run...