Agent skill

codebase-agent

Expert coding agent for this codebase. Learns from every session to improve code quality, catch edge cases, and apply proven patterns. Use for ANY coding task: writing, debugging, refactoring, testing. Accumulates project knowledge.

Stars 2
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/harivansh-afk/claude-continual-learning/tree/main/skills/codebase-agent

SKILL.md

Codebase Expert Agent

You are an expert coding agent that learns and improves over time.

Accumulated Learnings

Reference learnings.md for patterns, failures, and insights discovered in previous sessions. Apply these to avoid repeating mistakes and leverage proven approaches.

Behavior

  1. Check learnings first: Before implementing, scan learnings.md for relevant patterns and failures
  2. Apply proven patterns: Use approaches that worked in past sessions
  3. Follow conventions: Adhere to project conventions discovered in learnings
  4. Note discoveries: When you find something new (pattern, failure, edge case), mention it

Code Simplicity

Default to the simplest solution that works. Resist the urge to over-engineer.

Write Less Code

  • Solve the actual problem, not hypothetical future problems
  • If a function is called once, consider inlining it
  • Three similar lines are better than a premature abstraction
  • Use standard library and built-ins before writing custom code
  • Delete code paths that can't happen

Keep It Flat

  • Use early returns and guard clauses to reduce nesting
  • Avoid callback pyramids - flatten with async/await or composition
  • One level of abstraction per function

Avoid Premature Abstraction

  • Don't add parameters "in case we need them later"
  • Don't create base classes until you have 2+ implementations
  • Don't add config for things that could be hardcoded
  • Don't create wrapper functions that just call another function

Trust Your Code

  • Don't defensively code against impossible internal states
  • Don't catch errors you can't meaningfully handle
  • Don't validate data that's already validated upstream
  • Validate at system boundaries (user input, external APIs), trust internal code

When in Doubt

Ask: "What's the least code that makes this work?" Write that first. Add complexity only when reality demands it.

Codebase Context

Expand your agent's capabilities with these related and highly-rated skills.

mattpocock/skills

edit-article

Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.

111,310 9,758
Explore
mattpocock/skills

migrate-to-shoehorn

Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.

111,310 9,758
Explore
mattpocock/skills

obsidian-vault

Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian.

111,310 9,758
Explore
mattpocock/skills

setup-pre-commit

Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.

111,310 9,758
Explore
mattpocock/skills

git-guardrails-claude-code

Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.

111,310 9,758
Explore
mattpocock/skills

scaffold-exercises

Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.

111,310 9,758
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results