learn — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited learn (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Autonomously analyzes a project's codebase to discover development patterns, conventions, and architectural decisions, then generates project rule files in .claude/rules/ for Claude Code to follow.
This skill acts as the Orchestrator in a two-agent architecture. It coordinates the overall workflow: gathering project context, delegating deep analysis to the learn-analyst sub-agent, filtering and ranking results, presenting findings to the user, and persisting approved rules to .claude/rules/.
The separation of concerns ensures the analyst operates with a focused forensic prompt while the orchestrator manages user interaction and file persistence.
Use this skill when:
.claude/rules/ files from the existing codebaseTrigger phrases: "learn from project", "extract rules", "analyze conventions", "discover patterns", "generate project rules", "learn codebase", "auto-generate rules"
Before delegating to the analyst, gather high-level project context:
package.json, pom.xml, pyproject.toml, go.mod, .git/, or similar markers)# Check for existing rules
ls -la .claude/rules/ 2>/dev/null || echo "No .claude/rules/ directory found"
cat CLAUDE.md 2>/dev/null || echo "No CLAUDE.md found"
cat AGENTS.md 2>/dev/null || echo "No AGENTS.md found"
ls -la .cursorrules 2>/dev/null || echo "No .cursorrules found"# Quick project overview
find . -maxdepth 1 -type f -name "*.json" -o -name "*.toml" -o -name "*.xml" -o -name "*.gradle*" -o -name "Makefile" -o -name "*.yaml" -o -name "*.yml" | head -20
find . -type f -name "*.ts" -o -name "*.js" -o -name "*.java" -o -name "*.py" -o -name "*.go" -o -name "*.php" | wc -lInvoke the learn-analyst sub-agent to perform the deep codebase analysis.
Use the Task tool to delegate analysis to the learn-analyst agent:
learn-analystThe analyst will return a structured JSON report with classified findings.
Process the analyst's report:
.claude/rules/ files. Skip findings that duplicate existing rules.Present the filtered findings to the user in a clear, structured format:
I analyzed your codebase and found N patterns worth documenting as project rules:
1. **[RULE]** <Title> (Impact: X/10)
<One-line explanation>
2. **[RULE]** <Title> (Impact: X/10)
<One-line explanation>
3. **[RULE]** <Title> (Impact: X/10)
<One-line explanation>Then ask the user for confirmation using AskUserQuestion:
For each approved rule:
mkdir -p .claude/rulestitle field converted to kebab-case:"API Response Envelope Convention" → api-response-envelope-convention.mdrule-1.md or learned-pattern.md.claude/rules/ with the analyst's pre-formatted content✅ Rules saved successfully:
.claude/rules/api-response-envelope-convention.md
.claude/rules/feature-based-module-organization.md
.claude/rules/test-factory-pattern.md
These rules will be automatically applied by Claude Code in future sessions..claude/rules/ files are project-specific and should be version-controlled so the whole team benefits.claude/rules/ in the current project directory, never to global paths.claude/rules/, the skill may find few or no new patterns. This is expected.User request: "Learn from this project"
Phase 1 — Context assessment:
Found: TypeScript/NestJS project with 142 source files
Existing rules: 0 files in .claude/rules/
Starting deep analysis...Phase 4 — Presentation:
I analyzed your codebase and found 3 patterns worth documenting as project rules:
1. **[RULE]** Feature-Based Module Organization (Impact: 9/10)
All modules follow src/modules/<feature>/ with controller, service, dto, entity subdirectories.
2. **[RULE]** DTO Validation Convention (Impact: 8/10)
All DTOs use class-validator decorators and follow Create/Update naming pattern.
3. **[RULE]** Error Response Envelope (Impact: 7/10)
All API errors return { statusCode, message, error } consistent envelope format.
Save all 3 rules? [Save all / Let me choose / Cancel]Phase 5 — Persistence:
✅ Rules saved successfully:
.claude/rules/feature-based-module-organization.md
.claude/rules/dto-validation-convention.md
.claude/rules/error-response-envelope.md
These rules will be automatically applied by Claude Code in future sessions.User request: "Discover project patterns"
Phase 1 — Context assessment:
Found: Java/Spring Boot project with 87 source files
Existing rules: 4 files in .claude/rules/
Starting deep analysis...Phase 3 — After filtering:
The analyst found 6 patterns, but 4 overlap with your existing rules.
After deduplication, 2 new patterns remain:
1. **[RULE]** Repository Method Naming (Impact: 7/10)
All custom repository methods use findBy/existsBy/countBy prefix convention.
2. **[RULE]** Integration Test Database Strategy (Impact: 6/10)
Integration tests use @Testcontainers with PostgreSQL and @Sql for fixtures.
Save these 2 rules? [Save all / Let me choose / Cancel]~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.