Skip to content

feat(skills): add codebase-onboarding skill#553

Merged
affaan-m merged 8 commits intoaffaan-m:mainfrom
vazidmansuri005:feat/codebase-onboarding-skill
Mar 20, 2026
Merged

feat(skills): add codebase-onboarding skill#553
affaan-m merged 8 commits intoaffaan-m:mainfrom
vazidmansuri005:feat/codebase-onboarding-skill

Conversation

@vazidmansuri005
Copy link
Contributor

@vazidmansuri005 vazidmansuri005 commented Mar 17, 2026

Summary

  • Adds a new codebase-onboarding skill that analyzes unfamiliar codebases and generates structured onboarding guides + starter CLAUDE.md files
  • Canonical location: skills/codebase-onboarding/SKILL.md

Motivation

Every developer joining a new project faces the same ramp-up friction. This skill turns "help me understand this codebase" into a systematic 4-phase workflow that produces two actionable artifacts in under 2 minutes.

What It Does

  1. Reconnaissance — parallel detection of package manifests, frameworks, entry points, directory structure, tooling, and test setup
  2. Architecture mapping — identifies tech stack, architecture pattern, key directories, and traces one request end-to-end
  3. Convention detection — naming patterns, error handling style, async patterns, git workflow from recent history
  4. Artifact generation — produces a scannable onboarding guide + project-specific CLAUDE.md

Key Design Decisions

  • Uses Glob/Grep for reconnaissance, not exhaustive file reads — fast even on large repos
  • Enhances existing CLAUDE.md rather than replacing it
  • Flags unknowns explicitly rather than guessing
  • Onboarding guide targets 2-minute scannability

Type

  • Skill
  • Agent
  • Hook
  • Command

Checklist

  • Follows format guidelines
  • Under 500 lines
  • Includes practical examples
  • Uses clear section headers
  • No sensitive info

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 17, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a new "Codebase Onboarding" skill: documentation in two locations and an OpenAI agent config enabling implicit invocation. No executable code or public API/signature changes.

Changes

Cohort / File(s) Summary
Skill documentation
skills/codebase-onboarding/SKILL.md, .agents/skills/codebase-onboarding/SKILL.md
Adds a comprehensive "Codebase Onboarding" specification: four-phase workflow (Reconnaissance, Architecture Mapping, Convention Detection, Generate Onboarding Artifacts), reconnaissance signals, artifact templates (Onboarding Guide, Starter CLAUDE.md), examples, best practices, and anti‑patterns.
Agent configuration
.agents/skills/codebase-onboarding/agents/openai.yaml
Adds OpenAI agent configuration for the skill (display_name, short_description, brand_color, default_prompt) plus a policy block allowing implicit invocation. No logic or signature changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • affaan-m

Poem

🐰
I hop through README, sniff the trail,
Four phased paths where insights sail.
Guides unfurl and CLAUDE.md sings,
New devs find roots and sprout bright wings,
A tiny carrot crowns the tale. 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat(skills): add codebase-onboarding skill' directly and clearly describes the main change: adding a new codebase-onboarding skill to the skills directory.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 17, 2026

Greptile Summary

This PR adds a new skills/codebase-onboarding/SKILL.md skill that implements a systematic 4-phase workflow (Reconnaissance → Architecture Mapping → Convention Detection → Artifact Generation) for onboarding developers into unfamiliar codebases. Many issues flagged in earlier review rounds have been resolved: HTML example-marker comments now annotate the template tables and entry-point lists, a shallow-clone fallback was added to Phase 3, and the hardcoded docs/ output path was removed.

Remaining issues:

  • Missing Antigravity counterpart: .agents/skills/codebase-onboarding/SKILL.md and .agents/skills/codebase-onboarding/agents/openai.yaml are still absent. Every other skill with Antigravity support has both files; without them this skill is unavailable to Antigravity users despite the PR description claiming cross-harness support.
  • Prose descriptions in Phase 1 framework fingerprinting (line 31–32): Django, Flask, FastAPI, and Rails entries are described in natural language rather than as concrete glob patterns, unlike every other entry in the same block. This makes LLM-driven detection on non-JS stacks ambiguous.
  • No existing-file handling for the Onboarding Guide output (lines 111–168): Output 2 (CLAUDE.md) explicitly instructs the LLM to read and enhance an existing file rather than overwrite it. Output 1 (Onboarding Guide) has no equivalent guard, so running the skill twice will silently clobber any human annotations in onboarding-guide.md.

Confidence Score: 3/5

  • Safe to merge as a documentation-only skill, but the missing Antigravity counterpart means the stated cross-harness goal is not yet met.
  • The skill content itself is well-structured and most template-consistency issues from prior rounds have been addressed. Score is held at 3 because the .agents/skills/codebase-onboarding/ directory and openai.yaml file (required by every other Antigravity-enabled skill in the repo) are still absent, the Onboarding Guide output lacks an idempotent "check-before-overwrite" guard, and Phase 1 framework fingerprinting is inconsistently specified for non-JS stacks.
  • skills/codebase-onboarding/SKILL.md — Phase 1 framework patterns (line 31) and Output 1 existing-file handling (line 111). The missing .agents/skills/codebase-onboarding/ directory also needs attention before the PR matches its stated Antigravity support goal.

Important Files Changed

Filename Overview
skills/codebase-onboarding/SKILL.md New skill document implementing a 4-phase codebase onboarding workflow. Most template placeholder issues from previous review rounds have been addressed (HTML comments added, git shallow-clone fallback added, docs/ path removed). Two remaining issues: framework fingerprinting in Phase 1 mixes prose descriptions with glob patterns for non-JS stacks, and the Onboarding Guide output lacks the same "check-before-overwrite" guidance that exists for the CLAUDE.md output. The corresponding .agents/skills/codebase-onboarding/ Antigravity directory and openai.yaml are still absent.

Sequence Diagram

sequenceDiagram
    actor User
    participant Skill as codebase-onboarding
    participant Glob as Glob/Grep Tools
    participant FS as File System
    participant Output as Output Files

    User->>Skill: "Onboard me to this codebase"
    Skill->>Glob: Phase 1 — Parallel Reconnaissance
    Glob->>FS: Detect package manifests
    Glob->>FS: Fingerprint frameworks
    Glob->>FS: Find entry points
    Glob->>FS: Snapshot directory tree
    Glob->>FS: Detect config & tooling
    Glob->>FS: Find test structure
    FS-->>Skill: Raw signals

    Skill->>Skill: Phase 2 — Architecture Mapping
    Note over Skill: Identify tech stack, pattern,<br/>key directories, data flow

    Skill->>Skill: Phase 3 — Convention Detection
    Note over Skill: Naming, error handling,<br/>async patterns, git conventions

    Skill->>Output: Phase 4 — Generate Artifacts
    Output->>User: Onboarding Guide (conversation / project root)
    Output->>FS: CLAUDE.md (project root, create or enhance)
Loading

Last reviewed commit: "fix: add shallow-clo..."

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.agents/skills/codebase-onboarding/SKILL.md:
- Around line 11-50: The SKILL.md uses "Onboarding Workflow" and lacks explicit
"How It Works" and "Examples" sections required by the skill-format template;
rename the "Onboarding Workflow" heading to "How It Works", move the Phase 1–4
bullets under that heading, and add a new "Examples" section containing 2–3
concise examples showing (a) activation triggers (e.g., "User: onboard me" or
first open) and (b) expected outputs (e.g., "Onboarding Guide" and "Starter
CLAUDE.md"); ensure headings match the repo template and keep the existing "Best
Practices" content intact.

In `@skills/codebase-onboarding/SKILL.md`:
- Around line 11-210: The SKILL.md uses nonstandard headings (e.g., "When to
Activate", "Onboarding Workflow", "Phase 1…4", "Output 1/2") but must follow the
required schema "When to Use", "How It Works", and include an explicit
"Examples" section; update the document headings by renaming or aliasing "When
to Activate" -> "When to Use", consolidate "Onboarding Workflow" and the Phase
1–4 descriptions under a "How It Works" heading (keep phase bullets as
subsections), and add a clear "Examples" section showing sample Reconnaissance
checks and a sample generated CLAUDE.md (use the existing Output 1/Output 2
content as examples); ensure the top-level headings "When to Use", "How It
Works", and "Examples" appear in SKILL.md.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 472bb8a2-bd46-4ed2-b6a8-7c74c119f445

📥 Commits

Reviewing files that changed from the base of the PR and between fce4513 and d0385a4.

📒 Files selected for processing (3)
  • .agents/skills/codebase-onboarding/SKILL.md
  • .agents/skills/codebase-onboarding/agents/openai.yaml
  • skills/codebase-onboarding/SKILL.md

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 3 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="skills/codebase-onboarding/SKILL.md">

<violation number="1" location="skills/codebase-onboarding/SKILL.md:166">
P2: Workflow contradiction: it says to enhance existing CLAUDE.md, but Output 2 only instructs generating a new file and never requires reading/merging an existing one.</violation>
</file>

Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Add one-off context when rerunning by tagging @cubic-dev-ai with guidance or docs links (including llms.txt)
  • Ask questions if you need clarification on any suggestion

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 2 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".agents/skills/codebase-onboarding/SKILL.md">

<violation number="1" location=".agents/skills/codebase-onboarding/SKILL.md:79">
P2: The onboarding workflow is overly HTTP-centric: it requires tracing a request/response lifecycle and a `Request Lifecycle` section even for non-service repos, risking inaccurate generated docs.</violation>

<violation number="2" location=".agents/skills/codebase-onboarding/SKILL.md:149">
P2: Onboarding guide template hardcodes Node/Prisma commands despite claiming multi-ecosystem support, which can produce incorrect setup instructions for non-Node repositories.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.agents/skills/codebase-onboarding/SKILL.md (1)

222-223: Consider softening the fixed output path in examples.

The example currently implies mandatory write locations. Consider wording it as “for example” to avoid over-constraining implementations across harnesses/repos.

✏️ Suggested wording tweak
-**Output**: Two artifacts written to `docs/onboarding-guide.md` and `CLAUDE.md`
+**Output**: Two artifacts (for example, `docs/onboarding-guide.md` and `CLAUDE.md`)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.agents/skills/codebase-onboarding/SKILL.md around lines 222 - 223, Update
the Output wording in .agents/skills/codebase-onboarding/SKILL.md so it doesn't
assert fixed write locations; replace the current line "**Output**: Two
artifacts written to `docs/onboarding-guide.md` and `CLAUDE.md`" with a softened
variant such as "**Output (example)**: Two artifacts, e.g. written to
`docs/onboarding-guide.md` and `CLAUDE.md`" or "**Output**: Two artifacts (for
example: `docs/onboarding-guide.md` and `CLAUDE.md`)" to indicate these paths
are illustrative rather than mandatory.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.agents/skills/codebase-onboarding/SKILL.md:
- Around line 222-223: Update the Output wording in
.agents/skills/codebase-onboarding/SKILL.md so it doesn't assert fixed write
locations; replace the current line "**Output**: Two artifacts written to
`docs/onboarding-guide.md` and `CLAUDE.md`" with a softened variant such as
"**Output (example)**: Two artifacts, e.g. written to `docs/onboarding-guide.md`
and `CLAUDE.md`" or "**Output**: Two artifacts (for example:
`docs/onboarding-guide.md` and `CLAUDE.md`)" to indicate these paths are
illustrative rather than mandatory.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4654230e-7dad-4d6c-9d8e-c62aa3db134f

📥 Commits

Reviewing files that changed from the base of the PR and between 5f3e8b3 and be79f45.

📒 Files selected for processing (3)
  • .agents/skills/codebase-onboarding/SKILL.md
  • .agents/skills/codebase-onboarding/agents/openai.yaml
  • skills/codebase-onboarding/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • skills/codebase-onboarding/SKILL.md
  • .agents/skills/codebase-onboarding/agents/openai.yaml

@vazidmansuri005
Copy link
Contributor Author

@affaan-m Ready for review — all bot feedback has been addressed.

@affaan-m
Copy link
Owner

Thanks for the codebase-onboarding skill! This fills a real gap.

Items to address:

  1. Duplicate paths: Like feat(skills): add architecture-decision-records skill #555, this adds to both skills/ and .agents/skills/. Please keep the canonical version in skills/codebase-onboarding/SKILL.md and either remove or minimize the .agents/ copy.

  2. Merge conflicts: Please rebase on the latest main.

Adds a skill that systematically analyzes an unfamiliar codebase and
produces two artifacts: a structured onboarding guide and a starter
CLAUDE.md tailored to the project's conventions.

Four-phase workflow:
1. Reconnaissance — parallel detection of manifests, frameworks, entry
   points, directory structure, tooling, and test setup
2. Architecture mapping — tech stack, patterns, key directories, request
   lifecycle tracing
3. Convention detection — naming, error handling, async patterns, git
   workflow from recent history
4. Artifact generation — scannable onboarding guide + project-specific
   CLAUDE.md

Includes Antigravity support via .agents/skills/ and openai.yaml.
- Rename headings to match skill format: When to Activate → When to Use,
  Onboarding Workflow → How It Works
- Add Examples section with 3 usage scenarios
- Mark Phase 4 Next.js paths as example with HTML comments
- Fix CLAUDE.md generation to read/enhance existing file first
- Replace abbreviated .agents/ SKILL.md with full copy per repo convention
Adds <!-- Example for a Node.js project --> comment to Common Tasks,
matching the markers already on Key Entry Points and Where to Look.
Syncs .agents/ copy.
- Add example comment to Tech Stack table in Phase 4 template
- Add example comment to Key Directories block in Phase 2
- Shorten openai.yaml default_prompt to match repo convention (~60 chars)
- Sync .agents/ SKILL.md copy
- Phase 3: add fallback for repos with no git history
- Example 1: remove hardcoded docs/ path assumption, output to
  conversation or project root instead
- Sync .agents/ copy
@vazidmansuri005 vazidmansuri005 force-pushed the feat/codebase-onboarding-skill branch from 5104af5 to 03821dc Compare March 20, 2026 05:25
@vazidmansuri005
Copy link
Contributor Author

Done — removed the .agents/skills/codebase-onboarding/ copy entirely. Canonical version stays at skills/codebase-onboarding/SKILL.md. Rebased on latest main.

@affaan-m affaan-m merged commit 72c013d into affaan-m:main Mar 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants