learn-codebase

learn-codebase is a skill for Claude Code, Codex from niclejeune/pi-agents-config. It costs 101 tokens per session (2,173 once invoked), scanned A, original, MIT.

A project onboarding helper that scans a codebase for instruction files, coding conventions, available skills, and possible security concerns.

In plain words
What is it for?
Use it when joining a new project, checking its rules, learning team conventions, or looking for anything unsafe or unusual.
Why use it?
It helps an agent understand an unfamiliar project before making changes and can bring hidden rules or suspicious code to attention.

Skill for Claude CodeCodex

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 skills/niclejeune/pi-agents-config/learn-codebase
Any agent
npx skills add niclejeune/pi-agents-config --skill learn-codebase
Clone the repo
git clone --depth 1 https://github.com/niclejeune/pi-agents-config

Made for: Claude Code, Codex.

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 learn-codebase

README.md
[![agentmods](https://agentmods.dev/badge/skills/niclejeune/pi-agents-config/learn-codebase.svg)](https://agentmods.dev/skills/niclejeune/pi-agents-config/learn-codebase)
Your own site
<a href="https://agentmods.dev/skills/niclejeune/pi-agents-config/learn-codebase"><img src="https://agentmods.dev/badge/skills/niclejeune/pi-agents-config/learn-codebase.svg" alt="Measured on agentmods" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,173 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00101 $0.02173
Opus 5 $0.00051 $0.01086
Sonnet 5 $0.00020 $0.00435
Haiku 4.5 $0.00010 $0.00217

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

Security

Grade A, and why

learn-codebase scanned grade A with 1 finding 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

-e '\.innerHTML\s*=' -e 'child_process' -e '\$\(.*\$\{' \
.pi/agent/skills/learn-codebase/SKILL.md · 208 lines

How it starts

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

Learn Codebase Conventions

Scan the current project for agent instruction files from various tools, summarize the conventions, and optionally register discovered skills in .pi/settings.json.

Step 1: Scan for Convention Files

Search the project root for these files and directories:

# Agent instruction files (root-level)
for f in CLAUDE.md AGENTS.md COPILOT.md .cursorrules .clinerules; do
  [ -f "$f" ] && echo "FOUND: $f"
done

# Agent config directories
for d in .claude .cursor .github .pi; do
  [ -d "$d" ] && echo "FOUND DIR: $d/"
done

# Deeper convention files
[ -f ".github/copilot-instructions.md" ] && echo "FOUND: .github/copilot-instructions.md"

# Claude Code rules, skills, and commands
[ -d ".claude/rules" ] && echo "FOUND: .claude/rules/"
[ -d ".claude/skills" ] && echo "FOUND: .claude/skills/"
[ -d ".claude/commands" ] && echo "FOUND: .claude/commands/"

# Cursor rules
[ -d ".cursor/rules" ] && echo "FOUND: .cursor/rules/"

# Pi project skills
[ -d ".pi/skills" ] && echo "FOUND: .pi/skills/"

Step 2: Read and Summarize

For each discovered file, read its contents and extract key conventions:

  1. Root instruction files (CLAUDE.md, AGENTS.md, .cursorrules, etc.) — read fully, these are the primary project rules
  2. Rule directories (.claude/rules/, .cursor/rules/) — read each rule file
  3. Commands (.claude/commands/) — read each command file. These are reusable prompt workflows from Claude Code (e.g., PR creation, release scripts, review checklists). Summarize what each command does.
  4. Skills directories (.claude/skills/, .cursor/skills/) — list available skills and read their descriptions
  5. Settings files (.claude/settings.json) — note permissions and configuration

Present a structured summary to the user:

## Project Conventions Summary

### Build & Run
- Package manager: [npm/pnpm/yarn/bun]
- Dev command: [command]
- Test command: [command]

### Code Style
- [Key style rules]

### Architecture
- [Key patterns, structure]

### Agent-Specific Rules
- [Any rules targeted at AI agents]

### Available Commands (from .claude/commands/)
- [command-name] — [what it does]

### Available Skills (from other tools)
- [List skills found in .claude/skills, .cursor/skills]

Read the full file on GitHub · 208 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 · 208 lines · 101 tokens per session scan A c79981e33947

Subscribe to this mod's changes

learn-codebase is a skill published in the GitHub repository niclejeune/pi-agents-config (2 stars, last pushed 4mo ago), licensed MIT. It adds 101 tokens to every session and 2,173 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

exa-research-planner

Plan, draft, and execute Exa deep-research workflows. Use when the user wants staged research planning, cost-aware discovery before deep synthesis, or an explicit deep-research report. Also use when the user asks to refine a research question, compare options, explore a market or technical landscape, gather sources…

feniix/pi-extensions · 79 tokens

brpr

(devtools plugin) Create a branch, commit changes, push, and open a PR — or just commit+push+PR if already on a feature branch. Links related issues from GitHub or Linear based on project tracker config.

feniix/pi-extensions · 49 tokens

workspace-explorer

Explore and navigate Notion workspaces via MCP. Use when searching for pages, understanding database structure, finding content, creating or updating pages/databases, or managing Notion workspace content. Triggers when user asks about Notion, mentions Notion pages/databases, wants to find something in their wiki…

feniix/pi-extensions · 123 tokens

merge

Merge or squash-merge a pull request and report best-effort remote and local source-branch cleanup. Use when user says "merge this PR", "squash merge", "md", "smd", or anything about merging pull requests.

feniix/pi-extensions · 52 tokens

release

Automate the release process. Use when user says "cut a release", "new version", "bump version", "publish release", or anything about versioning and publishing.

feniix/pi-extensions · 38 tokens

setup-oauth

Guide the user through setting up Notion MCP with OAuth authentication.

feniix/pi-extensions · 16 tokens