Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Inventorying Codebase Patterns

ASecurity

Builds replayable, source-derived catalogs with drift checks. Use when a migration or audit needs a trustworthy inventory across files.

64 stars
0 votes
0 copies
0 views
Added 9/20/2026
testingrustexpressgit

Security Analysis

A100/100

Scanned 9/20/2026

$npx -y skills add bdsqqq/dots --skill inventorying-codebase-patterns --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Inventorying Codebase Patterns?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Inventorying Codebase Patterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bdsqqq-inventorying-codebase-patterns/badge)](https://www.skillsdirectory.com/skills/bdsqqq-inventorying-codebase-patterns)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: inventorying-codebase-patterns
description: "Builds replayable, source-derived catalogs with drift checks. Use when a migration or audit needs a trustworthy inventory across files."
metadata:
  archetype: rule-following
---

# inventorying codebase patterns

make the inventory reproducible; a plausible count is not coverage.

## contract

- input: repository/revision, pattern definition, included paths, exclusions, and consumers of the inventory.
- output: deterministic generator, catalog with source coordinates and exceptions, and an exercised non-writing `--check` wired into the relevant validation path.
- termination: replay is stable, detection and stale-output tests pass, and unresolved extraction limits are reported. an inventory does not authorize migration.

## procedure

1. inspect real occurrences before choosing extraction. use scoped text search for discovery; use the repository's parser when aliases, nested syntax, conditional classes, or wrappers affect meaning. document unsupported dynamic expressions rather than guessing values.
2. define the inclusion rule and test both a known match and a near-match that must be excluded. search separately for alternative spellings/imports or wrappers to challenge completeness. exclude generated output from its own inputs.
3. emit normalized paths, source coordinates, stable ordering, and only fields consumers need. omit timestamps and machine-specific paths. distinguish static alternatives from values known to occur at runtime. keep intentional exceptions identifiable, not buried in counts.
4. derive generated data and consumer types from one source of truth. for literal records, prefer `type Variant = (typeof variants)[number]` over a parallel handwritten shape. do not cast away extraction failures. generated files name their regeneration command; edits belong upstream.
5. make write mode regenerate; make `--check` compute expected output and compare without modifying files, exiting nonzero on missing or stale output. ensure formatting is deterministic in both modes.
6. invoke the check from the actual ci/package validation entry point when the catalog must stay current. inspect command order: regeneration before comparison can silently repair drift and defeat the gate. declaring a script is not wiring it into ci.

## evaluation

in a disposable copy, generate twice and compare bytes. independently assert expected records for a small fixture containing an alias, a conditional branch, and an excluded near-match when supported. then corrupt a generated count or remove the output: run the actual validation entry point, expect nonzero, and confirm it did not repair the file. regenerate and expect success. change an input occurrence too; the check must detect source drift, not only file corruption. preserve the original worktree.

report the commands, decisive outputs, scope, and known blind spots. if the catalog is temporary, name its removal condition and which durable enforcement replaces it; do not preserve a second truth after its consumer disappears.

## provenance

[depot migration](https://ampcode.com/threads/T-01a08307-6d5a-715a-82c9-cddd3b28d3cc): source-derived types and a stale catalog missed by ci until the check was wired and falsified. normative: [meaningful contribution](https://gist.github.com/bdsqqq/1e7e6f454271d5f856a1176d0e800d89), [skill design](https://gist.github.com/bdsqqq/a699a7d85d43f5df0c6e0fe93c827e65). constraints above stand without opening these links.

Attribution

bdsqqqbdsqqq
View sourceSee grades on GitHubMore from bdsqqq →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Screen Reader Testing

Practical guide to testing web applications with screen readers for comprehensive accessibility validation.

401991 votes

Tdd Workflow

在编写新功能、修复错误或重构代码时使用此技能。强制执行测试驱动开发,包含单元测试、集成测试和端到端测试,覆盖率超过80%。

2456590 votes

Eval Harness

克劳德代码会话的正式评估框架,实施评估驱动开发(EDD)原则

2456590 votes

Python Testing

使用pytest、TDD方法、夹具、模拟、参数化和覆盖率要求的Python测试策略。

2456590 votes

Django Tdd

Django测试策略,包括pytest-django、TDD方法论、factory_boy、模拟、覆盖率以及测试Django REST Framework API。

2456590 votes
View all in testing →