Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add FarzamMohammadi/the-engineer --skill system-layer-extractiongit clone --depth 1 https://github.com/FarzamMohammadi/the-engineerWrote 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/skills/farzammohammadi/the-engineer/system-layer-extraction)<a href="https://agentmods.dev/skills/farzammohammadi/the-engineer/system-layer-extraction"><img src="https://agentmods.dev/badge/skills/farzammohammadi/the-engineer/system-layer-extraction/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/skills/farzammohammadi/the-engineer/system-layer-extraction"><img src="https://agentmods.dev/badge/skills/farzammohammadi/the-engineer/system-layer-extraction.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.00140 | $0.01874 |
| Opus 5 | $0.00070 | $0.00937 |
| Sonnet 5 | $0.00028 | $0.00375 |
| Haiku 4.5 | $0.00014 | $0.00187 |
Grade A, and why
system-layer-extraction 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 9d 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 — 181 lines — stays where its author put it; the contents beside it link to each section on GitHub.
System Layer Extraction
Investigate an entire codebase file-by-file to extract every system, map their boundaries, dependencies, state, lifecycle, and isolation potential. Produce a comprehensive layered architecture document and interactive visualization.
This is slow, thorough work. The value comes from reading actual source code — not READMEs, not architecture docs, not summaries. Every file gets read. Every import gets traced. The output is a document that makes the invisible structure visible.
Why This Matters
Codebases accumulate structure over time that nobody fully sees. Systems intertwine. Dependencies form that aren't in any diagram. State gets shared in ways the original authors didn't intend. This skill makes all of that explicit — so you can refactor with confidence, onboard new contributors faster, and identify where isolation is strong vs where it's fragile.
The Process
Step 1: Set Up
Create a working branch so the output files don't pollute the main branch:
git checkout -b system-layer-extraction
Step 2: Map the Territory
Before reading any code, get the full picture of what exists:
# All non-test source files, sorted
find src -name "*.ts" ! -name "*.test.ts" ! -name "*.spec.ts" | sort
# All source directories
find src -type d | sort
# Line counts per directory (rough sizing)
find src -name "*.ts" ! -name "*.test.ts" | xargs wc -l | sort -n
This gives you the raw material: how many files, how they're organized, where the mass is.
Step 3: Group Files Into Investigation Areas
Divide all source files into 5-8 logical groups based on directory structure and apparent concern. Each group becomes one subagent's assignment. Typical groupings:
- Entry points + CLI + Bootstrap — how the system starts, wires, and presents to users
- Communication infrastructure — event bus, observer/logging, streaming
- Core domain services — task engine, safety, authorization, memory, workspace
- Intelligence/orchestration — the brain, phase pipeline, prompts, LLM interaction
- Plugin ecosystem — adapters, registry, hooks, concrete plugin implementations
- Data layer — database, config, schemas, migrations
- UI/Dashboard — if present, the monitoring/visualization layer
- Cross-cutting — utilities, shared types, interfaces
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.
- 9d ago First seen · 181 lines · 140 tokens per session scan A ff685488910d
system-layer-extraction is a skill published in the GitHub repository FarzamMohammadi/the-engineer (12 stars, last pushed 1mo ago), licensed MIT. It adds 140 tokens to every session and 1,874 once invoked, about $0.0007 per session on Opus 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 skills, from other repositories
doubt-driven-review
In-flight adversarial check on a non-trivial decision BEFORE it stands — distinct from post-hoc review of a finished diff. Use on "stress-test this decision", "are we sure about this", "verify before commit", "poke holes in this", when working in unfamiliar code, or before an irreversible step (migration, prod deploy…
release-cut
Cut a new pi-agent-dashboard release: promote ## [Unreleased] in CHANGELOG.md, bump every workspace package.json per SemVer, commit, tag v , and push — triggering the Release workflow that publishes every non-private workspace, builds the Electron artifacts, and creates a GitHub Release. Use on "cut a release"…
spec-coherence-check
Sweep all active OpenSpec proposals for staleness, conflicts, and obsolescence against the current codebase and archived changes. Use when proposals may be outdated, when checking cross-proposal conflicts, or before starting a batch of implementations. Produces a gap-analysis report, updates a priority queue file, and…
ship-it
Worktree-side implementation orchestrator for an OpenSpec change. Idempotent: gates automated scenarios on filesystem reality, owns the red-test fix loop, runs the docker harness with always-teardown, then drives ship-change inline. Escape hatch writes SHIPITBLOCKED.md. Runnable headless. Triggers: "ship it", "build…
faq-mine
Mine docs/faq.md from README.md, docs/.md, and the pi-hermes memory stores. Dispatches @fast subagents per source, dedupes against the existing FAQ, and merges entries in caveman style. Use when asked to "build / regenerate / extend the FAQ", "mine docs into FAQ", "mine hermes memory into FAQ", "surface runtime…
session-to-guideline
Turn a pi session into a Markdown "how-we-did-it" collaboration guideline: reads the session's JSONL transcript and synthesizes a reusable playbook of which prompts worked, what had to be steered, and how to reproduce the result faster. Use when: "document this session", "write up how we did X with the AI", "make a…