# Skill Auditor

> Analyze repository and generate custom SKILL.md with project-specific tech stack, architecture, and conventions. USE FOR: auditing repos, generating skill files, detecting architecture patterns, understanding project structure after major refactors. DO NOT USE FOR: writing application code, running tests, deploying.

- Skill: `habonn/skill-auditor` (Agent Skill)
- Install (CLI): `npx skillmds@latest add habonn/skill-auditor`
- Raw SKILL.md: https://api.skillmd.com/api/skills/habonn/skill-auditor/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: habonn (https://skillmd.com/u/habonn)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/habonn/skill-auditor

---


# Skill Auditor

Analyze your repository and generate a customized SKILL.md file so AI understands your project's architecture, tech stack, and conventions.

## When to Use This Skill

Use this skill when the user:

- Says "audit my repo" or "audit repo"
- Says "analyze project" or "analyze my project"
- Says "generate skill file" or "create skill file"
- Asks "/skill-audit"
- Wants to understand project structure
- After major refactoring or dependency updates

---

## Workflow

### Step 1: Scan Repository

Check for these files to understand the project:

**Dependencies:**
- `package.json` → Node.js/TypeScript project
- `go.mod` → Go project
- `requirements.txt` or `pyproject.toml` → Python project

Extract: project name, description, language version, framework, key dependencies

**Folder Structure:**

Check `src/`, `lib/`, `app/`, or `pkg/` for these patterns:

| Folders | Architecture |
|---------|-------------|
| `domain/`, `application/`, `infrastructure/` | Clean Architecture |
| `ports/`, `adapters/` | Hexagonal Architecture |
| `models/`, `views/`, `controllers/` | MVC |
| `collections/`, `payload.config.ts` | Payload CMS |
| `features/` or `modules/` | Feature-based |

**Infrastructure:**
- `Dockerfile` → Docker deployment
- `docker-compose.yml` → Check for postgres, mongo, redis
- `.gitlab-ci.yml` or `.github/workflows/` → CI/CD platform

**Code Style:**
- `.eslintrc.*`, `.prettierrc.*` → Formatting rules
- `tsconfig.json` → TypeScript settings

### Step 2: Generate Rules

Based on detected patterns, create rules:

**Clean Architecture:**
- ✅ Keep business logic in domain layer
- ❌ Don't import infrastructure into domain
- ✅ Use dependency injection

**Payload CMS:**
- ✅ Define collections in payload.config.ts
- ❌ Don't bypass Payload's access control
- ✅ Use Payload hooks for business logic

**Go:**
- ✅ Use standard library where possible
- ❌ Don't panic, return errors
- ✅ Follow Go naming conventions

### Step 3: Create Skill File

Generate `.kiro/skills/[project-name]/SKILL.md`:

```markdown
---
name: [project-name]
description: [description]
---

# [Project Name] - Custom Skill

> 🤖 Auto-generated by Skill Auditor

## Tech Stack
- Language: [detected]
- Framework: [detected]
- Key dependencies: [top 5-8]

## Architecture Pattern
**[Detected Pattern]**

Folder structure:
- src/domain/ - Business entities
- src/application/ - Use cases
- src/infrastructure/ - External integrations

Rules:
- ✅ [Do's]
- ❌ [Don'ts]

## Development Workflow
- dev: pnpm dev
- test: pnpm test
- build: pnpm build

## Infrastructure
- Deployment: Docker
- Database: PostgreSQL
- CI/CD: GitLab CI

## Project-Specific Rules
- [Generated rules based on architecture]
- [Framework-specific best practices]
```

### Step 4: Confirm

Show summary and confirm the skill file is active.

---

## Example

User: `/skill-audit`

Agent:
```
🔍 Analyzing repository...

Found:
- Language: Go 1.22
- Architecture: Clean Architecture
- Deployment: Docker + Kubernetes
- Database: PostgreSQL

✅ Generated: .kiro/skills/payment-service/SKILL.md

AI now understands your project structure.
```

---

## Configuration (Optional)

Add `.skill-auditor.config.json` for custom rules:

```json
{
  "customRules": [
    "All API responses must include 'success' field",
    "Use Zod for validation"
  ]
}
```

---

## Tips

- Run after major changes to keep skill file current
- Commit skill file to share with team
- Hooks will prompt you when dependencies change
- Use `/skill-audit --force` to regenerate

