ワンクリックで
audit-config-sprawl
Find configuration sprawl - duplicated constants, types, and values that should be centralized
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Find configuration sprawl - duplicated constants, types, and values that should be centralized
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Keep the Threa Pi remote-control extension in `extensions/pi-remote/` aligned with the current Pi extension API and Threa bot-runtime public API. Use when asked to update, verify, sync, or troubleshoot the Pi remote plugin, `/remote-control`, or `threa-remote.ts`.
Create a well-structured pull request with proper description, design decisions, and file changes. Use when asked to create a PR, open a PR, or submit changes for review.
Call Threa's public REST API (send/list/search/update/delete messages, list streams/users/members, search memos/attachments) with curl or a Bun script. Use when asked to post messages to a stream, seed a stream with test data, drive the API from automation, dedupe by metadata, inspect a production workspace (streams, messages, members) for troubleshooting, or otherwise hit https://staging.threa.io / https://app.threa.io endpoints with an API key. Reads from production should use the read-only prod key.
Rewrite user-facing copy (marketing pages, docs, headings, UI microcopy, READMEs, PR descriptions) to strip AI-slop and salesy tone, leaving plain, understated, factual prose. Use when asked to "deslopify", "deslop", "remove the AI slop", "make this less salesy/less AI-sounding", "make the copy plainer", or when reviewing copy for slop tells.
Run multi-perspective code review on a PR or the local branch
Write a session handover doc for the next agent picking up this line of work. Use when asked to "write a handover", "hand over", "handoff doc", or at the end of a session whose work continues in a future session.
| name | audit-config-sprawl |
| description | Find configuration sprawl - duplicated constants, types, and values that should be centralized |
Find and report configuration sprawl across the codebase. Configuration sprawl occurs when the same value, constant, type, or configuration is defined in multiple places instead of being imported from a single source of truth.
Configuration sprawl leads to:
Every piece of configuration should have exactly one canonical source. Consumers import from that source. If you find the same thing defined twice, one of them shouldn't exist.
Before searching for sprawl, understand where configuration SHOULD live:
Check for a shared types package (e.g., packages/types, @company/types)
Check for config files in feature directories
config.ts filesReview CLAUDE.md or similar for documented conventions
Look for these general categories. The specific items will vary by codebase.
Search for the same constant value appearing in multiple files:
- String literals that look like configuration
- Numeric values that appear repeatedly (temperatures, timeouts, limits)
- Arrays/enums that define valid values for something
Red flag: Same string/number appears in 3+ files, or a local const SOMETHING = when a shared package exports it.
Search for type definitions that appear in multiple places:
- interface SomeName { ... } in multiple files
- type SomeName = ... in multiple files
- Types that exist in a shared package but are redeclared locally
Red flag: grep -r "interface TypeName" returns multiple files.
Search for string literals used as discriminators or configuration:
- Status values: "active", "pending", "failed"
- Type discriminators: "user", "admin", "system"
- Mode flags: "on", "off", "auto"
- Feature identifiers in conditionals
Red flag: Same string literal appears in multiple files without a shared constant.
Search for exports that just re-export from somewhere else:
- export { X } from "./other-file"
- export type { X } from "./other-file"
Red flag: Consumers import from A, which re-exports from B. Why not import from B directly?
Search for configuration in test/eval directories that duplicates production config:
- Model IDs hardcoded in tests instead of imported from production config
- Prompts/schemas copied into test fixtures
- Constants redefined for "testing purposes"
Red flag: Test and production use different values for the same concept.
For each potential sprawl issue:
For each finding, report:
## [SEVERITY] [Brief title]
**Issue**: [What's duplicated and why it's a problem]
**Files**:
- `path/to/file1.ts:line` - [what it defines]
- `path/to/file2.ts:line` - [what it defines]
**Canonical source**: [Where this should live]
**Fix**:
1. [Step to centralize]
2. [Step to update consumers]
These are examples of grep/glob patterns to find sprawl. Adapt to your codebase:
# Find potential constant duplication
grep -r "const.*TYPES\s*=" --include="*.ts"
grep -r "export const.*=.*\[" --include="*.ts"
# Find potential type duplication
grep -r "^export interface" --include="*.ts" | sort | uniq -d
grep -r "^export type" --include="*.ts" | sort | uniq -d
# Find magic strings (common patterns)
grep -rE '"(active|pending|failed|enabled|disabled)"' --include="*.ts"
grep -rE 'status\s*===?\s*"' --include="*.ts"
# Find re-exports
grep -r "export.*from\s*['\"]\./" --include="*.ts"
# Find hardcoded model IDs (AI projects)
grep -rE '"[a-z]+:[a-z]+/[a-z]' --include="*.ts"
# Find hardcoded numbers that look like config
grep -rE "temperature:\s*0\.[0-9]" --include="*.ts"