project-scanner

project-scanner is an agent for coding agents from jongwony/epistemic-protocols. It costs 22 tokens per session (1,251 once invoked), scanned A, original, MIT.

A project-discovery helper for Claude Code that reads stored project folders and session metadata, then returns information about recent projects.

In plain words
What is it for?
Use it to find the three most recently changed Claude Code projects, reconstruct their original paths, and prepare structured project information for reports or onboarding.
Why use it?
It removes the need to inspect Claude Code's project directories and session index by hand. It also gathers supporting sources for analysis and onboarding work.

Agent

Part of the epistemic-cooperative plugin — 22 skills, 4 agents shipped together

Install

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.

agentmods
npx agentmods add agents/jongwony/epistemic-protocols/project-scanner
Clone the repo
git clone --depth 1 https://github.com/jongwony/epistemic-protocols

Or install epistemic-cooperative, the plugin that ships this one along with the rest of its 22 skills, 4 agents.

Wrote 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.

agentmods badge for project-scanner

README.md
[![agentmods](https://agentmods.dev/badge/agents/jongwony/epistemic-protocols/project-scanner.svg)](https://agentmods.dev/agents/jongwony/epistemic-protocols/project-scanner)
Your own site
<a href="https://agentmods.dev/agents/jongwony/epistemic-protocols/project-scanner"><img src="https://agentmods.dev/badge/agents/jongwony/epistemic-protocols/project-scanner.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,251 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00022 $0.01251
Opus 5 $0.00011 $0.00626
Sonnet 5 $0.00004 $0.00250
Haiku 4.5 $0.00002 $0.00125

Measured 4d ago against content hash 137f19803cc6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

project-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 4d 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.

epistemic-cooperative/agents/project-scanner.md · 129 lines

How it starts

The opening of the file, as written. The whole thing — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a project discovery specialist. Your task is to scan Claude Code project directories, read session metadata, and return structured project information for the epistemic-cooperative analysis skills (/report, /onboard).

Process

Step 1: List and Sort Projects

Run a single Bash command that:

  1. Lists all directories under ${CLAUDE_CONFIG_DIR-$HOME/.claude}/projects/
  2. Gets modification time for each using stat -f%m (macOS) with stat -c%Y (Linux) fallback
  3. Sorts by modification time (descending)
  4. Selects the top 3
claude_cfg_dir="${CLAUDE_CONFIG_DIR-$HOME/.claude}"
projects_dir="${claude_cfg_dir:+$claude_cfg_dir/}projects"
for d in "$projects_dir"/*/; do
  mtime=$(stat -f%m "$d" 2>/dev/null || stat -c%Y "$d" 2>/dev/null || echo 0)
  echo "$mtime $d"
done | sort -rn | head -3

Step 2: Reconstruct Project Paths

For each selected project directory, reconstruct the actual filesystem path from the encoded directory name:

  • Directory names encode absolute paths: /-, .-
  • Example: -Users-choi--claude-epistemic-protocols/Users/choi/.claude/epistemic-protocols

Heuristic reconstruction:

  1. Strip the leading - to get the raw encoded path
  2. The first segment is typically Users → reconstruct as /Users/
  3. The second segment is the username
  4. Double - (--) often indicates a . directory (e.g., --claude/.claude)
  5. Convert to ~ notation when the path starts with the home directory

Step 3: Read and Parse Sessions Index

For each project, read sessions-index.json and extract:

  • Total session count
  • Each session's: id, modified, firstPrompt, summary, messageCount
  • Select the 3 most recently modified sessions (by modified field)

Use a single Bash command with Python for parsing:

python3 -c "
import json, sys
data = json.load(open(sys.argv[1]))
sessions = sorted(data, key=lambda s: s.get('modified', ''), reverse=True)[:3]
for s in sessions:
    print(f'id={s[\"id\"]} modified={s.get(\"modified\",\"\")} msgs={s.get(\"messageCount\",0)} first={s.get(\"firstPrompt\",\"\")[:100]}')
print(f'total={len(data)}')
" PATH_TO_SESSIONS_INDEX

Read the full file on GitHub · 129 lines

Changes

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.

  1. 4d ago First seen · 129 lines · 22 tokens per session scan A 137f19803cc6

Subscribe to this mod's changes

project-scanner is an agent published in the GitHub repository jongwony/epistemic-protocols (160 stars, last pushed today), licensed MIT. It adds 22 tokens to every session and 1,251 once invoked, about $0.0001 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.

Related

Other agents, from other repositories

plan-sync

Synchronizes downstream task specs after implementation. Spawned by flow-next-work once per resolved wave. Do not invoke directly.

gmickel/flow-next · 27 tokens

flow-gap-analyst

Map user flows, edge cases, and missing requirements from a brief spec.

gmickel/flow-next · 21 tokens

practice-scout

Gather modern best practices and pitfalls for the requested change.

gmickel/flow-next · 15 tokens

comment-analyzer

PRFlow's comment-quality reviewer, dispatched by the review engine and available directly. Use this agent when you need to analyze code comments for accuracy, completeness, and long-term maintainability. This includes (1) after generating large documentation comments or docstrings, (2) before finalizing a pull request…

The01Geek/prflow · 117 tokens

challenger

Frontier-grade adversarial evaluator for harness assets, papers, designs, and code. Goes beyond fixed-angle critique — adapts attack vectors to artifact type, enforces evidence citation on every attack, models its own information asymmetry (Sandboxed Adversary), and tracks convergence across rounds. Returns structured…

chrono-meta/forge-harness · 102 tokens

beginner

Frontier-grade first-contact standpoint evaluator. Simulates a zero-context user meeting an artifact for the first time — attempts the task cold rather than skimming, then reports exactly where comprehension or execution breaks. Lowest tier of the user-mastery spectrum (beginner → main-player → expert). Constructive…

chrono-meta/forge-harness · 117 tokens