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.

globalMITClaude Code, Cursor, Windsurf, JetBrains AI
Allowed Tools
BashReadGlobGrepWriteWebFetch
category:developer-tools
author:skillrepo
0installs0uses
v1.2Saved 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

Content has changed since this analysis was run. Results may be outdated.

Overall Score

87/100

Grade

A

Excellent

Safety

92

Quality

84

Clarity

88

Completeness

82

Summary

This skill analyzes a user's codebase to extract its patterns, conventions, and workflows, then generates a reusable AI agent skill (SKILL.md file) conforming to the agentskills.io specification. The generated skill is published to SkillRepo as a private skill for activation in IDE sessions.

Static Analysis Findings

1 finding

Patterns detected by deterministic static analysis before AI scoring. Hover over any finding code for detailed information and remediation guidance.

Credential Exposure
SEC-020Direct .env File Access

Direct .env file access

SKILL.md.env

Detected Capabilities

Read and analyze source files to identify coding patternsScan directory structure to understand project architectureExtract tech stack, frameworks, and dependencies from build configsGenerate structured SKILL.md files conforming to agentskills.io specificationPublish generated skills to SkillRepo via MCP toolIdentify and document coding conventions, API patterns, and testing practicesProduce error handling guidance for generated skills

Trigger Keywords

Phrases that MCP clients use to match this skill to user intent.

generate skill from codebasecapture project conventionscreate workflow automation skilldocument coding patternsskillrepo publishagent onboarding

Risk Signals

INFO

SEC-020: Direct .env file access mentioned

SKILL.md | Security Boundaries section
INFO

File read operations during codebase analysis

SKILL.md | Step 1 and Step 2
INFO

Write operation to generate SKILL.md

SKILL.md | Step 4 and Step 5
INFO

MCP tool invocation (add_skill)

SKILL.md | Step 5

Referenced Domains

External domains referenced in skill content, detected by static analysis.

agentskills.io

Use Cases

  • Capture project coding conventions for consistent AI agent behavior across sessions
  • Create workflow automation skills for common development tasks like adding features or running tests
  • Onboard new contributors or AI agents faster with project-specific pattern documentation
  • Extract and reuse patterns from one project in other projects with the same tech stack

Quality Notes

  • ✓ Well-structured workflow with clear 5-step process that matches the agentskills.io specification
  • ✓ Explicit security boundaries prominently documented — the skill teaches agents what NOT to do with sensitive data
  • ✓ Step 3 requires user confirmation before generation, avoiding over-automation and ensuring intent alignment
  • ✓ Concrete guidance on quality targets (200–500 lines, specific examples, relative paths) helps ensure generated skills are high-quality
  • ✓ Error handling section covers common failure modes (empty projects, permission errors, naming validation)
  • ✓ Limitations clearly stated, managing user expectations about static analysis and evolution
  • ✓ Mentions allowed-tools in frontmatter, providing transparency about agent capabilities
  • ? Could benefit from a worked example showing before/after (sample codebase → generated SKILL.md) to make the process more concrete
  • ? Step 4 could include guidance on when NOT to generate (e.g., projects too simple or too idiosyncratic) to help users decide if this skill is appropriate
Model: claude-haiku-4-5-20251001Analyzed: Apr 5, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Version History

v1.2

Built-in skill updated

2026-04-15

Latest
v1.1

Built-in skill updated

2026-03-14

v1.0

Initial built-in skill

2026-03-08

Add skillrepo/agent-skill-generator to your library

Command Palette

Search for a command to run...