Skip to main content
ContextForge

Pack Format

How packs are structured in the registry, and what each file contains.

Directory structure

txt
packs/nextjs-best-practices/
  pack.json        ← manifest (title, version, files)
  rules.md         ← general pack rules
  agents.md        ← Codex / general agent adapted prompt
  claude.md        ← Claude Code adapted prompt
  skill.md         ← full skill reference
  cursor.mdc       ← Cursor adapted prompt
  copilot.md       ← GitHub Copilot adapted prompt

pack.json

The manifest file describes the pack and lists which instruction files it includes.

pack.json
{
  "name": "nextjs-best-practices",
  "title": "Next.js Best Practices",
  "version": "0.1.0",
  "description": "App Router patterns, server components, and performance guidance for Next.js.",
  "topic": "nextjs",
  "classification": "task-triggered",
  "files": ["rules", "agents", "claude", "skill", "cursor", "copilot"],
  "tags": ["nextjs", "react", "typescript", "app-router"],
  "requiredBy": []
}
nameUnique pack identifier. Used in CLI commands.
titleHuman-readable display name.
versionSemver version string.
descriptionOne-line description shown in list/search output.
topicCategory grouping (e.g. nextjs, agent-workflow, security).
classification"always-active" (core behavior) or "task-triggered" (context-specific).
filesWhich instruction files this pack provides.
requiredByPacks that depend on this one (for dependency resolution).

Instruction files

Each pack can include multiple instruction files, one per supported tool. The CLI downloads only the files relevant to the tools you selected.

rules.mdCanonical, tool-neutral rules. The source of truth for the pack's behavior.
agents.mdAdapted for Codex and general agent use. Written as direct instructions.
claude.mdAdapted for Claude Code. May use Claude-specific syntax or emphasis.
skill.mdFull skill reference. Stored in .contextforge/skills/<pack>/SKILL.md.
cursor.mdcAdapted for Cursor. Uses .mdc format.
copilot.mdAdapted for GitHub Copilot instructions.

Sample rules.md

rules.md
# Next.js Best Practices

## App Router

- Use Server Components by default.
- Add `"use client"` only when the component needs browser APIs or event handlers.
- Do not use `getServerSideProps` or `getStaticProps` — these belong to the Pages Router.

## Data Fetching

- Fetch data directly in Server Components using `async/await`.
- Use `loading.tsx` for streaming suspense boundaries.
- Cache server fetches with `cache: "force-cache"` or revalidation options.

## Images

- Always use `next/image` instead of plain `<img>`.
- Provide `width` and `height` or use `fill` with a positioned container.

Pack classifications

always-active

Core behavior packs. Always applied regardless of what the agent is doing. Examples: verification-before-completion, git-workflow.

task-triggered

Stack or domain packs. Applied when the agent is working in that area. Examples: nextjs-best-practices, supabase.