---
name: init-context
description: "Build a complete mental map of a project through phased exploration so you can work effectively without rediscovering things. Use when the user wants to: (1) Onboard onto a new or unfamiliar codebase, (2) Get a full project overview or briefing, (3) Understand project architecture, structure, and open work, (4) Initialize context at the start of a deep work session, (5) Explore and summarize a repository end-to-end. Triggers on requests like \"explore this repo\", \"get familiar with this project\", \"give me a project overview\", \"onboard me\", \"init context\", or any request to deeply understand a codebase before working on it."
title: init-context
canonical_url: https://skilld.dev/gh/vicnaum/vics-agent-skills/init-context
last_updated: 2026-09-18T20:45:28.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install vicnaum/vics-agent-skills/init-context`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/init-context`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/vicnaum/vics-agent-skills/init-context) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/init-context`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/init-context --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/init-context --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

Build a complete mental map of this project so you can work effectively without rediscovering things. Follow these phases:

## Phase 1: Direct Reading (your own context)
Find and read key documentation files directly — do NOT delegate these, you need them in YOUR context:
- Look for root-level markdown files: README, STATUS, CHANGELOG, CONTRIBUTING, ARCHITECTURE, ROADMAP, REFERENCE, WORKLOG, and any project-specific docs (CLAUDE.md, AGENTS.md, etc.)
- Look for a CLAUDE.md or similar agent instruction file
- Check for a `.claude/` directory with project config or memory files
- If the codebase is large - use a sub-agent with a `layered-summary` skill for the code sources folder to generate (or update, if exists) the AGENTS.md summaries

## Phase 2: Sub-agent Exploration (parallel)
Based on what you learned in Phase 1, spawn sub-agents to explore the major areas of the codebase. Each agent should read all documentation files in its area, skim key source files, and return a structured summary of: what's there, how it works, key decisions, and where to look for what.

Typical areas to explore (adapt based on actual project structure):
- **Each major source directory** — architecture, key modules, entry points, important types/interfaces
- **Tests & CI** — test structure, CI config, how to run tests
- **Config & Infrastructure** — deployment configs, environment setup, docker files, scripts
- **Documentation subdirectories** — any docs/, wiki/, knowledge-base/, research/, or analysis/ folders
- **GitHub/GitLab history** — previous commits list, closed PRs, closed Issues (using `gh` if available)
- **GitHub/GitLab current state** — open issues, open PRs, recent commits and activity (`gh issue list`, `gh pr list` if available)

Adjust the number and focus of sub-agents based on project size. Small project = 2-3 agents. Large monorepo = 5-6 agents, iterative.

## Phase 3: Fill Gaps
After receiving all sub-agent summaries, identify gaps in your understanding:
- Are there key source files referenced in docs that you haven't seen?
- Is the data flow / request lifecycle clear end-to-end?
- Do you understand how to build, test, and run the project?
- Is there anything that you're still missing and need to see?
- Spawn additional sub-agents or read files yourself as needed
- Check recent git log (`git log --oneline -20`) for context on latest changes

## Phase 4: Synthesize
Provide a concise project briefing covering:
- **Project overview**: What is this? What problem does it solve?
- **Current state**: What phase/version? What works? What's in progress?
- **Architecture map**: How the major pieces fit together, data flow, key abstractions
- **Open work**: Issues, PRs, blockers, next steps
- **Key numbers**: Any important metrics, benchmarks, or thresholds
- **Developer guide**: How to build, test, run. Key commands.
- **Where to find things**: Quick reference for common lookups (config, entry points, types, tests)

The goal: after this runs, you should have FULL project context and never need to ask "where is X?" or "what does Y do?" for the common cases.
