AGENT SKILL

codebase-understanding

CRG-first codebase navigation skill for all agents. Load when architecture must be traced, execution flow understood, impact radius determined, or entry points located before any implementation. Always queries code-review-graph before opening files — prevents blind file reads.

License 许可
MIT
最近更新
2026-07-25
Stars
★ 8
Forks
0

01 前言 Front Matter

name
codebase-understanding
metadata
{ "tier": 1, "source": "internal", "version": "1.0.0" }
use-when
Load for any agent that needs to understand an unfamiliar system before working on it. Load at the start of bug investigation, feature design, or refactor planning. Load whenever an agent would otherwise start with broad Read/Grep/Glob.
platforms
[ "claude-code", "codex", "copilot", "cursor", "windsurf" ]
description
CRG-first codebase navigation skill for all agents. Load when architecture must be traced, execution flow understood, impact radius determined, or entry points located before any implementation. Always queries code-review-graph before opening files — prevents blind file reads.
do-not-use-when
Do not load when the task is a trivial change to a well-known file that requires no architecture investigation. Not needed for a quick comment fix or rename.
task-categories
[ "navigation", "analysis", "investigation", "architecture" ]

03 SKILL.md 正文

Codebase Understanding — CRG-First

Core Rule

Query code-review-graph before reading any file. Never guess from filenames. Never grep blindly.

When to Use Each Agent

Task Agent First CRG Call
Understand system architecture architecture-agent get_architecture_overview
Read an unfamiliar feature codebase-reader get_minimal_context
Investigate a bug bug-investigation trace_execution_flow
Plan a refactor refactor-agent get_impact_radius
Implement a new feature feature-dev-agent find similar feature

CRG Tool Reference

Tool Use Case
get_architecture_overview Full system map before any analysis
trace_execution_flow Follow what runs in what order
get_minimal_context Orient around an unfamiliar symbol
find_entry_points Where does this feature start?
list_related_symbols What symbols participate in this feature?
trace_callers_callees Who calls this? What does it call?
get_impact_radius What breaks if I change this?
trace_dependencies What does this depend on?
identify_shared_symbols What is used by many callers?
identify_extension_points Where does new code attach?

File Read Limit

Maximum 8 files per investigation, each justified by graph evidence.

Fallback (no CRG)

State "Running without CRG evidence" once. Use targeted Grep on known symbols. Read only files directly implicated. State your reasoning for each file opened.

Output Template

## Summary
<one paragraph>

## Execution Flow
<numbered steps>

## Relevant Systems
<list with ownership>

## Root Cause / Behavior
<precise statement>

## Impact Radius
<what would change if this is modified>

## Recommended Next Step
<single concrete action>

04 同仓库更多 Skills

dyCuong03
dyCuong03/unity-agent-team

dots-update-groups

How to choose the right ECS system group and ordering so per-frame and per-fixed-step work is deterministic and never races its own readers. Covers InitializationSystemGroup / SimulationSystemGroup / PresentationSystemGroup / FixedStepSimulationSystemGroup / VariableRateSimulationSystemGroup, UpdateBefore / UpdateAfter peer ordering, OrderFirst / OrderLast group-boundary placement, RateManager, and the cross-group ordering trap. Use when adding an ISystem, fixing "value visible one frame late" bugs, or coupling simulation to a fixed timestep.

★ 8
dyCuong03
dyCuong03/unity-agent-team

dots-transform-patterns

The Entities 1.x transform model — LocalTransform (writable input) vs LocalToWorld (system-owned matrix), Parent/Child hierarchy, reparenting cost, uniform vs non-uniform scale (PostTransformMatrix), and when to opt out with custom transform systems. Use when designing parent/child hierarchies, runtime reparenting (mount/dismount/socket), or choosing transform components at the Baker boundary.

★ 8
dyCuong03
dyCuong03/unity-agent-team

dots-singleton-patterns

Model cross-system shared configuration and game state as a single-entity component with a strict single-writer contract. Covers RequireForUpdate gating, SystemAPI.GetSingleton / GetSingletonRW / HasSingleton / TryGetSingleton, bake-time vs runtime-created vs ECB-system singletons, the "exactly one entity" runtime invariant, and the single-writer rule. Use when designing frame-stable global config, shared mutable state, or any component intended to exist on exactly one entity.

★ 8
dyCuong03
dyCuong03/unity-agent-team

dots-hybrid-bridge

The one-way bridge between DOTS-owned runtime state and Unity-owned presentation. Covers UnityObjectRef for managed asset refs in components, the DOTS-writes / Unity-reads ownership rule, when to use managed IComponentData vs UnityObjectRef vs CompanionComponent, baker-bridge vs runtime-bridge, and SubScene boundary rules. Use when an entity must reference Unity assets (Mesh, Material, AudioClip, ScriptableObject), a MonoBehaviour view must read entity state, or input/UI must trigger ECS work.

★ 8
dyCuong03
dyCuong03/unity-agent-team

dots-event-driven-ecs

Model one-frame events and external requests in ECS without dual ownership, polling, or persistent state leaks. Covers request-tag pattern with ECB, enableable command components (no structural change), event buffers (IBufferElementData), explicit consumer ownership, one-frame latency rules, and the banned C# event / UnityEvent / static bus anti-patterns. Use when input/UI/network must trigger ECS work, when a one-frame signal fans out to N consumers (damage, hit, collision), or when state changes must be processed exactly once.

★ 8
dyCuong03
dyCuong03/unity-agent-team

valid_skill

A complete, well-formed test fixture skill for SkillHub validation testing. Covers basic task routing and code review for Unity projects.

★ 8