Borrowing it
Nothing to install: this file belongs to ai-sdlc-framework/ai-sdlc. 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/ai-sdlc-framework/ai-sdlc/main/.claude/commands/detect-patterns.mdgit clone --depth 1 https://github.com/ai-sdlc-framework/ai-sdlcWrote 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/commands/ai-sdlc-framework/ai-sdlc/detect-patterns)<a href="https://agentmods.dev/commands/ai-sdlc-framework/ai-sdlc/detect-patterns"><img src="https://agentmods.dev/badge/commands/ai-sdlc-framework/ai-sdlc/detect-patterns/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/commands/ai-sdlc-framework/ai-sdlc/detect-patterns"><img src="https://agentmods.dev/badge/commands/ai-sdlc-framework/ai-sdlc/detect-patterns.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.00000 | $0.00326 |
| Opus 5.5 | $0.00000 | $0.00130 |
| Sonnet 5.5 | $0.00000 | $0.00065 |
| Haiku 4.5 | $0.00000 | $0.00033 |
Grade A, and why
detect-patterns 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 1mo 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.
What it actually says
Detect repetitive workflow patterns from Claude Code session history and propose automations.
Steps
- Read telemetry data from
~/.claude/usage-data/tool-sequences.jsonl - Also read session metadata from
~/.claude/usage-data/session-meta/*.jsonfor historical data - Run pattern detection using the orchestrator's n-gram mining engine:
import { readToolSequenceJSONL, mineFrequentPatterns, classifyPattern } from '@ai-sdlc/orchestrator'; - Classify each pattern as command-sequence, copy-paste-cycle, or periodic-task
- Generate proposals for each detected pattern with draft artifact content
- Present results as a table: | # | Pattern | Type | Confidence | Frequency | Sessions | Proposed Artifact |
- For each proposal, show the draft artifact content and ask if the user wants to approve it
- If approved, write the artifact file using the artifact writer
Arguments
--since YYYY-MM-DD— only analyze events after this date--min-confidence 0.6— minimum confidence threshold (0-1)
Important
- Only create artifacts the user explicitly approves
- Never overwrite existing files
- Show the full draft content before writing
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.
- 1mo ago First seen · 34 lines · 0 tokens per session scan A ea3ea1304045
detect-patterns is a command published in the GitHub repository ai-sdlc-framework/ai-sdlc (415 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 326 tokens. 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 commands, from other repositories
discover
Discover runtime AI components and static AI dependencies with AIR Blackbox.
evidence
Export a signed compliance evidence package as JSON or PDF for regulatory handoff.
comply
Run a full EU AI Act compliance scan on your Python AI project.
hygiene-status
Disk hygiene snapshot for this Mac — free space, caches, stale worktrees, LaunchAgent state.
start
Get oriented with ArcKit — guided project onboarding, workflow selection, and command recommendations.
run-technical-review
Run /run-technical-review as a BACKGROUND task so this chat stays responsive. If the runinbackground tool is available: call runinbackground with name "Technical review + fix", completionmode "presentresult", the review instruction below, and a messagesequence with one follow-up message (id "fix") carrying the fix…