backup/framework/.clinerules/skills/project-index/SKILL.md
Analyze codebase structure, generate domain-specific sub-skills (UI, Backend, Database, etc.), and create agent-guidance files to help AI agents navigate and develop consistently within a project. Use when onboarding to a new codebase, creating project documentation, or setting up agent guidance systems.
npx skillsauth add b4san/ac-framework project-indexInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A skill for analyzing existing codebases and creating structured guidance systems for AI agents. Generates domain-specific knowledge and navigation aids without modifying source code locations.
Use this skill when:
python ./skills/project-index/scripts/scan_codebase.py /path/to/project --output codebase_index.json
Run the scanning script to generate a complete structural map:
python ./skills/project-index/scripts/scan_codebase.py <project_path> --output codebase_index.json
Important: The script provides a structural overview. You MUST also:
Parameters:
<project_path>: Absolute path to the project root--output: Output filename (default: codebase_index.json)Excluded directories: .git, node_modules, __pycache__, dist, build, .next, .expo
Review the generated codebase_index.json and:
CRITICAL: Do not rely solely on the JSON index. Actually explore the codebase:
For each identified domain, create a focused sub-skill using skill-writer:
# Load the skill-writer skill first, then:
# Create sub-skills like project-index-ui, project-index-backend, etc.
Each sub-skill should:
Use the template: ./skills/project-index/templates/skill-template.md
Naming convention: project-index-<domain> (e.g., project-index-ui, project-index-backend)
Create agent-<name>.md files in relevant project directories:
Use the template: ./skills/project-index/templates/agent-template.md
Each file should contain:
Location: ./skills/project-index/templates/skill-template.md
---
name: project-index-{{domain}}
description: "Domain-specific knowledge for {{domain}} in this project. Use when working on {{path}} or when user mentions {{domain}}-related tasks."
---
# {{Domain}} Domain Guide
## Overview
Context and purpose of the {{domain}} layer located in `{{path}}`.
## Navigation
- **Main Logic**: [Where core logic resides]
- **Data Flow**: [How data moves through this domain]
- **Key Files**: [Important entry points]
## Guidelines
1. [Specific guideline 1]
2. [Specific guideline 2]
## Reference
See `agent-{{domain}}.md` in the directory for implementation details.
Location: ./skills/project-index/templates/agent-template.md
# Agent Guide: {{name}}
## Purpose
Guidance for working in `{{path}}` following established patterns and practices.
## Methodology & Patterns
- **Pattern 1**: [Description]
- **Pattern 2**: [Description]
## Best Practices
- **Do**: [Recommended practice]
- **Avoid**: [Practice to avoid]
## Key Files
- [Important file 1]
- [Important file 2]
## Integration
Follow the structure of `{{example_file}}` when adding new elements.
.skills/project-index/
├── SKILL.md # This file
├── templates/
│ ├── skill-template.md # Template for sub-skills
│ └── agent-template.md # Template for agent guides
└── scripts/
└── scan_codebase.py # Codebase scanning utility
Start with basic structure analysis, then iteratively improve:
For organizations with multiple projects:
Before considering the index complete:
Original concept and implementation by b4san.
development
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
development
Automate the generation and maintenance of unit, integration, and end-to-end tests, as well as test data generation and debugging. Use when writing tests for new features, maintaining existing tests after API/UI changes, generating synthetic test data, or debugging test failures. Essential for ensuring code quality and preventing regressions.
testing
Generate comprehensive test suites ensuring requirements are met. Strategies for Unit, Integration, and E2E testing.
development
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes