agentleFS
PatriotAgenticLLCPatriotAgenticLLC/better_claude_skillz/skills/prime/SKILL.md

prime

Skill3 starsChanged 5 months agoMITView on GitHub

Load project context. Use at the start of every session. Supports quick (default) and full modes.

9 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use research.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • NVIDIASkill

    research

    Before designing a feature, research how comparable libraries solve the problem, check best practices, known pitfalls, and upstream changes. Use when starting a new feature, investigating an unfamiliar area, or the user asks to research something.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 8 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check $ARGUMENTS for mode.

    line 7
  2. Very specific:

    Read pyproject.toml, package.json, tsconfig.json, composer.json (full - usually short)

    line 89
  3. Distinctive:

    Test files (just list them)

    line 95
  4. Distinctive:

    If during planning you realize you need more context, run prime with "full" argument

    line 185
  5. Distinctive:

    For faster loading: Use prime without arguments (quick mode - 35-40K tokens)

    line 195
  6. Distinctive:

    Read CLAUDE.md or similar global rules file (FULL)

    line 230
  7. Distinctive:

    Read README files at project root and major directories (FULL)

    line 231
  8. Distinctive:

    Read any architecture documentation (FULL)

    line 232
  9. Very specific:

    Read PRD if it exists (.claude/PRD.md) (FULL)

    line 233
  10. Distinctive:

    Check current branch and status:

    line 250

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Check $ARGUMENTS for mode. If "$ARGUMENTS" is "full", follow Full Mode below. Otherwise follow Quick Mode (default).

Quick Mode

Prime Quick: Load Essential Project Context

Objective

Build sufficient understanding of the codebase by analyzing structure, documentation, and key files efficiently. Uses ~35-40K tokens instead of 85K+ (60% savings).

When to Use

  • Default choice for most feature planning and development
  • Starting a new session
  • Getting oriented in a codebase
  • Before planning features

When to Use Full Mode Instead

  • First time working with a codebase
  • Need deep architectural understanding
  • Planning major refactors or migrations
  • Onboarding to a complex project

Process

1. Analyze Project Structure (Compact)

List tracked files (first 50 only):

git ls-files | head -50

Show directory structure (depth 2 max):

find . -maxdepth 2 -type d -not -path '*/\.git/*' -not -path '*/__pycache__/*' -not -path '*/node_modules/*' | sort

Check root directory:

ls -la | head -20

2. Read Core Documentation (Selective)

ALWAYS READ:

  • Project CLAUDE.md (full - contains project-specific rules and context)
  • requirements.txt or package.json or similar (full - dependencies)

READ WITH LIMITS:

  • README.md (limit=100 lines - overview only, skip detailed usage)
  • Main entry point like app.py, index.ts, main.py (limit=100 lines - configuration and structure)

SKIP IN QUICK MODE:

  • ARCHITECTURE.md (use full mode if needed)
  • DEPLOYMENT.md
  • Additional documentation files
  • PRD (unless specifically needed for the task)

3. Identify Key Files (Efficient)

Use grep/find to identify structure without reading full files:

For Python projects:

# List all modules
ls -la modules/ src/ app/ 2>/dev/null | head -30

# Get function/class signatures (don't read full files)
grep -n "^class \|^def " *.py modules/*.py src/*.py 2>/dev/null | head -40

For JavaScript/TypeScript projects:

# List all source files
ls -la src/ lib/ components/ 2>/dev/null | head -30

# Get export signatures
grep -n "^export \|^class \|^function " src/**/*.{js,ts,tsx} 2>/dev/null | head -40

Configuration files:

  • Read pyproject.toml, package.json, tsconfig.json, composer.json (full - usually short)

SKIP full reads of:

  • Model/schema files (use grep for class names only)
  • Service/controller files (use grep for function signatures)
  • Template files
  • Test files (just list them)

4. Understand Current State (Minimal)

Recent activity (5 commits, not 10):

git log -5 --oneline

Current branch and status (compact):

git status --short
git branch --show-current

Python version check (if Python project):

python --version 2>&1

5. Test Infrastructure (Overview Only)

Don't read test files, just list:

ls -la tests/ test/ __tests__/ 2>/dev/null | head -20
find tests/ -name "*.py" -o -name "*.js" -o -name "*.ts" 2>/dev/null | head -10

Output Report

Provide a concise summary covering:

Project Overview

  • Purpose and type of application
  • Primary technologies and frameworks
  • Current version/state

Architecture

  • Overall structure and organization (based on directory listing)
  • Key architectural patterns identified (from CLAUDE.md and file structure)
  • Important directories and their purposes

Tech Stack

  • Languages and versions
  • Frameworks and major libraries (from dependencies file)
  • Build tools and package managers
  • Testing frameworks (from dependencies)

Core Principles

  • Code style and conventions observed (from CLAUDE.md)
  • Documentation standards
  • Testing approach (from test directory structure)

Current State

  • Active branch
  • Recent changes or development focus (from last 5 commits)
  • Any immediate observations or concerns

Key Files Identified

  • Main entry points
  • Configuration files
  • Module/component structure (high-level only)

Keep the summary concise - use bullet points and clear headers. Focus on actionable information.

Token Budget

Target: 35-40K tokens (vs 85K+ for full mode)

  • Structure analysis: ~5-10K
  • Core docs: ~10-15K
  • File signatures: ~5-10K
  • Current state: ~5K
  • Report: ~5-10K

Differences from Full Mode

AspectQuick ModeFull Mode
Token usage35-40K85K+
READMEFirst 100 linesFull read
Source filesgrep signatures onlyFull reads
Test filesList onlyRead examples
DocsCLAUDE.md onlyAll docs
Git history5 commits10 commits
File listinghead -50All files
Use case90% of sessionsDeep dives

Notes

  • If during planning you realize you need more context, run prime with "full" argument
  • Quick mode captures ~95% of useful context for most tasks
  • You can always read specific files later with the Read tool
  • Focus is on structure and patterns, not exhaustive coverage

Full Mode

Prime Full: Comprehensive Project Context

Token Usage: 85K+ tokens For faster loading: Use prime without arguments (quick mode - 35-40K tokens)

Objective

Build comprehensive understanding of the codebase by analyzing structure, documentation, and key files in depth.

When to Use

  • First time working with a codebase
  • Need deep architectural understanding
  • Planning major refactors or migrations
  • Onboarding to complex projects
  • Need to understand all documentation and patterns

Process

1. Analyze Project Structure

List all tracked files:

git ls-files

Show directory structure: On Windows/Linux, run:

# If tree is available
tree -L 3 -I 'node_modules|__pycache__|.git|dist|build|.venv'

# Otherwise use ls/dir
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/   /' -e 's/-/|/'

2. Read Core Documentation

  • Read CLAUDE.md or similar global rules file (FULL)
  • Read README files at project root and major directories (FULL)
  • Read any architecture documentation (FULL)
  • Read PRD if it exists (.claude/PRD.md) (FULL)

3. Identify Key Files

Based on the structure, identify and read:

  • Main entry points (main.py, index.ts, app.py, server.js, etc.) (FULL)
  • Core configuration files (pyproject.toml, package.json, tsconfig.json, composer.json) (FULL)
  • Key model/schema definitions (FULL)
  • Important service or controller files (FULL)

4. Understand Current State

Check recent activity:

git log -10 --oneline

Check current branch and status:

git status

Output Report

Provide a concise summary covering:

Project Overview

  • Purpose and type of application
  • Primary technologies and frameworks
  • Current version/state

Architecture

  • Overall structure and organization
  • Key architectural patterns identified
  • Important directories and their purposes

Tech Stack

  • Languages and versions
  • Frameworks and major libraries
  • Build tools and package managers
  • Testing frameworks

Core Principles

  • Code style and conventions observed
  • Documentation standards
  • Testing approach

Current State

  • Active branch
  • Recent changes or development focus
  • Any immediate observations or concerns

Make this summary easy to scan - use bullet points and clear headers.

Token Budget

Full Mode: 85K+ tokens

Differences from Quick Mode

AspectQuick ModeFull Mode
Token usage35-40K85K+
READMEFirst 100 linesFull read
Source filesgrep signatures onlyFull reads
Test filesList onlyRead examples
DocsCLAUDE.md onlyAll docs
Git history5 commits10 commits
File listinghead -50All files
Use case90% of sessionsDeep dives

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.