Skip to content

Commit ade162b

Browse files
committed
chore: customize skill graph for socket-cli
1 parent 6d0f729 commit ade162b

File tree

5 files changed

+31
-67
lines changed

5 files changed

+31
-67
lines changed

.claude/agents/code-reviewer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
You are a code reviewer for a Node.js/TypeScript monorepo (socket-registry).
1+
You are a code reviewer for a Node.js/TypeScript monorepo (socket-cli).
22

33
Apply the rules from CLAUDE.md sections listed below. Reference the full section in CLAUDE.md for details — these are summaries, not the complete rules.
44

.claude/agents/refactor-cleaner.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
You are a refactoring specialist for a Node.js/TypeScript monorepo (socket-registry).
1+
You are a refactoring specialist for a Node.js/TypeScript monorepo (socket-cli).
22

33
Apply these rules from CLAUDE.md exactly:
44

.claude/commands/quality-loop.md

Lines changed: 17 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,21 @@
1-
# quality-loop
1+
Run the `/quality-scan` skill and fix all issues found. Repeat until zero issues remain or 5 iterations complete.
22

3-
Run comprehensive quality scan and automatic issue fixing loop for socket-cli.
4-
5-
## What it does
6-
7-
Executes an iterative quality improvement cycle:
8-
9-
1. Updates dependencies
10-
2. Cleans up repository (removes junk files)
11-
3. Validates code structure
12-
4. Runs specialized quality scans
13-
5. Fixes ALL issues found
14-
6. Commits fixes
15-
7. Repeats until zero issues or 5 iterations
16-
17-
## Usage
18-
19-
```bash
20-
/quality-loop
21-
```
22-
23-
## Scan types
24-
25-
- **critical** - Crashes, security, data corruption, auth handling
26-
- **logic** - Algorithm errors, edge cases, validation bugs
27-
- **cache** - Config/token caching correctness
28-
- **workflow** - Build scripts, CI/CD, cross-platform compatibility
29-
- **security** - GitHub Actions security, credential handling
30-
- **documentation** - Command examples, flag accuracy, API docs
3+
**Interactive only** — this command makes code changes and commits. Do not use as an automated pipeline gate.
314

325
## Process
336

34-
The skill will:
35-
- Ask which scans to run (default: all)
36-
- Run dependency updates
37-
- Clean junk files with confirmation
38-
- Execute selected scans sequentially
39-
- Aggregate and deduplicate findings
40-
- Fix issues and commit changes
41-
- Repeat until clean or max iterations
42-
43-
## Exit conditions
44-
45-
- ✅ Success: Zero issues found
46-
- ⏹️ Stop: After 5 iterations (prevent infinite loops)
47-
48-
## Notes
49-
50-
- Commits fixes with proper git messages
51-
- Skips no issues (fixes architectural problems too)
52-
- Runs tests after each iteration
53-
- Reports progress and statistics
54-
55-
Use this command to maintain high code quality standards across socket-cli.
7+
1. Run `/quality-scan` skill (all scan types)
8+
2. If issues found: spawn the `refactor-cleaner` agent (see `agents/refactor-cleaner.md`) to fix them, grouped by category
9+
3. Run verify-build (see `_shared/verify-build.md`) after fixes
10+
4. Run `/quality-scan` again
11+
5. Repeat until:
12+
- Zero issues found (success), OR
13+
- 5 iterations completed (stop)
14+
6. Commit all fixes: `fix: resolve quality scan issues (iteration N)`
15+
16+
## Rules
17+
18+
- Fix every issue, not just easy ones
19+
- Spawn refactor-cleaner with CLAUDE.md's pre-action protocol: dead code first, then structural changes, ≤5 files per phase
20+
- Run tests after fixes to verify nothing broke
21+
- Track iteration count and report progress

.gitignore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ yarn-error.log*
7474
# ============================================================================
7575
*.log
7676
**/build/*.log
77-
**/.claude/*
78-
!**/.claude/agents/
79-
!**/.claude/commands/
80-
!**/.claude/ops/
81-
!**/.claude/skills/
77+
/.claude/*
78+
!/.claude/agents/
79+
!/.claude/commands/
80+
!/.claude/ops/
81+
!/.claude/skills/
8282

8383
# ============================================================================
8484
# Backup and temporary files

CLAUDE.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
- Always prefer editing existing files
7878
- Forbidden to create docs unless requested
7979
- Required to do exactly what was asked
80-
- NEVER use `npx`, `pnpm dlx`, or `yarn dlx` — use `pnpm exec` or `pnpm run` with pinned devDeps
80+
- 🚨 **NEVER use `npx`, `pnpm dlx`, or `yarn dlx`** — use `pnpm exec <package>` for devDep binaries, or `pnpm run <script>` for package.json scripts. If a tool is needed, add it as a pinned devDependency first.
8181

8282
## ROLE
8383

@@ -497,14 +497,12 @@ The file system is working memory. Use it actively:
497497

498498
## Agents & Skills
499499

500-
Reusable automation infrastructure lives in `.claude/`:
501-
502-
- **Agents** (`.claude/agents/`): Specialized sub-agent definitions (code-reviewer, security-reviewer, refactor-cleaner)
503-
- **Skills** (`.claude/skills/`): Multi-phase pipelines with shared components in `_shared/`
504-
- **Ops** (`.claude/ops/queue.yaml`): Pipeline run tracking and phase ordering
505-
- **Commands** (`.claude/commands/`): Slash-command entry points that invoke skills
506-
507-
Skills reference shared components (`env-check`, `verify-build`, `security-tools`, `report-format`) and can spawn agents for specialized work. Pipeline state is tracked in `queue.yaml`.
500+
- `/security-scan` — runs AgentShield + zizmor security audit
501+
- `/quality-scan` — comprehensive code quality analysis
502+
- `/quality-loop` — scan and fix iteratively
503+
- Agents: `code-reviewer`, `security-reviewer`, `refactor-cleaner` (in `.claude/agents/`)
504+
- Shared subskills in `.claude/skills/_shared/`
505+
- Pipeline state tracked in `.claude/ops/queue.yaml`
508506

509507
## Quality Standards
510508

0 commit comments

Comments
 (0)