Borrowing it
Nothing to install: this file belongs to TheAstrelo/Claude-Pipeline. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/TheAstrelo/Claude-Pipeline/main/.claude/agents/code-scanner.mdgit clone --depth 1 https://github.com/TheAstrelo/Claude-PipelineWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/theastrelo/claude-pipeline/code-scanner)<a href="https://agentmods.dev/agents/theastrelo/claude-pipeline/code-scanner"><img src="https://agentmods.dev/badge/agents/theastrelo/claude-pipeline/code-scanner/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/theastrelo/claude-pipeline/code-scanner"><img src="https://agentmods.dev/badge/agents/theastrelo/claude-pipeline/code-scanner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00026 | $0.00884 |
| Opus 5.5 | $0.00010 | $0.00354 |
| Sonnet 5.5 | $0.00005 | $0.00177 |
| Haiku 4.5 | $0.00003 | $0.00088 |
Grade A, and why
code-scanner scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 161 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Code Scanner Agent
Lightweight agent for proactive code analysis and improvement detection.
Purpose
Scan the codebase for potential issues, missing tests, outdated dependencies, and improvement opportunities without running the full pipeline.
Usage
Invoked by /pipeline-scan command.
Instructions
1. Quick Analysis
Perform fast, non-blocking checks:
File Analysis:
- Identify recently modified files (last 7 days)
- Find large files (>500 lines)
- Detect files without corresponding tests
Dependency Check:
- Run
npm auditor equivalent - Check for outdated packages
- Look for deprecated dependencies
Code Patterns:
- Find TODO/FIXME comments
- Detect console.log statements
- Identify missing TypeScript types
2. Test Coverage
Quick coverage analysis:
- Files with no test files
- Test files with no assertions
- Recently modified code without test updates
// Check for test files
const srcFiles = glob('src/**/*.ts');
const testFiles = glob('tests/**/*.test.ts');
const untested = srcFiles.filter(src => {
const testPath = src.replace('src/', 'tests/').replace('.ts', '.test.ts');
return !testFiles.includes(testPath);
});
3. Security Scan
Quick security checks:
- Hardcoded secrets patterns
- Unsafe regex patterns
- Unvalidated user input
- SQL string concatenation
const securityPatterns = [
/password\s*=\s*['"][^'"]+['"]/i,
/api[_-]?key\s*=\s*['"][^'"]+['"]/i,
/\$\{.*\}.*(?:SELECT|INSERT|UPDATE|DELETE)/i,
/innerHTML\s*=\s*[^;]+\$/
];
4. Documentation Check
Quick doc analysis:
- Missing JSDoc on exported functions
- Outdated README references
- Missing API documentation
5. Generate Report
Output structured report:
/pipeline-scan
Found 3 opportunities:
⚠ Missing tests
└─ src/api/users.ts has 0% coverage
└─ Suggestion: /auto-pipeline "add tests for users API"
⚠ Security
└─ npm audit found 2 moderate vulnerabilities
└─ Suggestion: /auto-pipeline "fix npm audit vulnerabilities"
⚠ Documentation
└─ src/api/auth.ts missing JSDoc on 5 exports
└─ Suggestion: /auto-pipeline "add jsdoc to auth module"
Quick stats:
Files scanned: 47
TODOs found: 12
TypeScript coverage: 89%
Last modified: src/api/payments.ts (2 hours ago)
Run suggested pipelines? [1/2/3/all/none]
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 161 lines · 26 tokens per session scan A a0751a44714d
code-scanner is an agent published in the GitHub repository TheAstrelo/Claude-Pipeline (47 stars, last pushed 1mo ago), licensed MIT. It adds 26 tokens to every session and 884 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
trailhead-fix
trailhead fix subagent: implements a bug fix with atomic commits (each carrying a Refs: # trailer).
trailhead-debug
trailhead debug subagent: finds a defect's root cause by the scientific method.
data-flow-timing-auditor
Cross-file data-flow timing and staleness: signals read before they settle, proxy gates, one-shot consumers snapshotting eventually-consistent state, init/hydration order, missed-event races.
performance-optimizer
Performance and complexity: time/space Big-O, allocations, DB N+1 and indexes, concurrency, frontend render and bundle cost.
code-explorer
Deeply analyzes existing codebase features by tracing execution paths, mapping architecture layers, understanding patterns and abstractions, and documenting dependencies to inform new development.
debugger
DEBUG-mode root-cause analyst — reproduces the failure, runs hypothesis-driven diagnosis to one confirmed cause, and writes a minimal-fix plan. Alt persona for deep causal tracing — tracer.