Tony-Claude-Code-Skills / skills
CLAUDE.md2 starsChanged 5 months agoMITView on GitHub
Run commands directly from TypeScript source using tsx: The project follows a standard TypeScript/Node.js layout with clear separation of concerns:
- Installs packages
In this repository4 other files it gives its agents.
- skills/AGENTS.mdAGENTS.md
- my-config/CLAUDE.mdCLAUDE.md
- skillsSkill
- xiaolai-methodologySkill
The file
We split this CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Run commands directly from TypeScript source using tsx:
- Very specific: line 214
All paths use path.join() for cross-platform compatibility
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Common Commands
Development Mode (No Build Required)
Run commands directly from TypeScript source using tsx:
# Run installer in development mode
npm run dev:install
# Run other commands
npm run dev:uninstall
npm run dev:init
npm run dev:spec
npm run dev:spec-bin # Run standalone spec executable
# Run with custom arguments
npm run dev:run -- install --yes
npm run dev:run -- spec "Add user authentication"
npm run dev:spec-bin -- test-feature --add solution-design
# Or use tsx directly
npx tsx src/index.ts install
npx tsx src/bin/spec.ts test-featureBuild and Run
# Build the project
npm run build
# Run the built CLI directly
node dist/index.js install
node dist/index.js --help
# Or link globally for easier testing (simulates npx behavior)
npm link
the-agentic-startup install
the-agentic-startup spec test-feature
the-agentic-startup-spec test-feature # Standalone spec executable
the-agentic-startup --help
# Unlink when done testing
npm unlink -g the-agentic-startup
# Watch mode (rebuilds on file changes)
npm run dev
# Then in another terminal, run:
node dist/index.js installTesting
# Run all tests
npm test
# Run tests with coverage
npm run test:coverage
# Run tests in watch mode
npm run test:watch
# Run specific test file
npm test tests/core/installer/Installer.test.ts
# Run tests with UI (if available)
npm run test:uiDevelopment Workflow
# Format code
npm run format
# Lint code
npm run lint
# Type check
npm run typecheck
# Clean build artifacts
npm run clean
# Full check (lint + typecheck + test)
npm run checkArchitecture Overview
Package Structure
The project follows a standard TypeScript/Node.js layout with clear separation of concerns:
src/index.ts: Entry point that exports CLI runnersrc/bin/: Standalone executable commandsspec.ts: Standalone spec executable (the-agentic-startup-spec)
src/cli/: CLI command implementations using Commander.jsindex.ts: CLI setup with Commander.js, registers all commandsinstall.ts: Installation command that launches Ink-based TUIuninstall.ts: Uninstall command with lock file readinginit.ts: Initialize DOR/DOD/TASK-DOD templatesspec.ts: Create numbered spec directories with TOML output
src/core/: Core business logic modulesinstaller/: Installation logic and file managementInstaller.ts: Main installer with rollback mechanismLockManager.ts: Lock file creation, reading, checksum managementSettingsMerger.ts: Deep merge settings with backup/restore
init/: Template initialization logicInitializer.ts: DOR/DOD/TASK-DOD template processing
spec/: Specification directory managementSpecGenerator.ts: Auto-incrementing IDs, TOML output, template generation
types/: TypeScript type definitionsconfig.ts: Configuration types for all commandssettings.ts: Claude settings.json typeslock.ts: Lock file format types with v1→v2 migration support
src/ui/: Ink-based interactive UI components (React)install/: Installation wizard componentsInstallWizard.tsx: Main wizard with state machine (6 states)ChoiceSelector.tsx,FinalConfirmation.tsx,Complete.tsx: UI components
uninstall/: Uninstall wizardUninstallWizard.tsx: Lock file reading and confirmation
shared/: Reusable UI componentstheme.ts,Spinner.tsx,ErrorDisplay.tsx,Banner.tsx
tests/: Comprehensive test suitecore/: Unit tests for all core modulesui/: UI component tests using ink-testing-libraryintegration/: Integration tests for full workflows
docs/: Project documentation structuredomain/: Business rules, workflows, and domain patternspatterns/: Technical patterns and architectural solutionsinterfaces/: API contracts and service integrationsspecs/: Feature specifications (PRD, SDD, PLAN documents)
Embedded Assets
The application includes all assets as separate files distributed with the npm package:
assets/claude/agents/**/*.md: Agent definitions (11 roles, 39 activities)assets/claude/commands/**/*.md: Slash command definitions (5 commands)assets/claude/output-styles/the-startup.md: Custom output styleassets/the-startup/templates/*: Template files (PRD, BRD, SDD, PLAN, DOR, DOD, TASK-DOD)assets/the-startup/rules/*: Agent delegation and cycle pattern rules
UI Architecture (Ink/React)
The installer uses React components with Ink for terminal UI:
- InstallWizard: Main component orchestrating installation flow
- State Machine: Manages transitions between installation steps
- Intro → StartupPath → ClaudePath → FileSelection → Installing → Complete
- React Components: Each step is a separate React component
- ChoiceSelector: Arrow key navigation menu for path selection
- FinalConfirmation: Final confirmation screen with file tree display
- Complete: Shows installation success summary
- Banner: ASCII art banner display
- ErrorDisplay: Handles error display with recovery options
Installation Flow
- User runs
the-agentic-startup installornpm run dev install - Ink TUI launches with path selection
- Files are selected using interactive tree (or --yes flag for all)
- Assets are copied to:
.claude/agents/and.claude/commands/: Agent and command definitions.the-startup/templates/: Template files.the-startup/rules/: Agent delegation rules
- Settings.json is merged with hooks (backup created)
- Lock file (v2 format) is created with checksums
- Rollback mechanism ensures clean state on any failure
Lock File Format
The project supports two lock file versions with automatic migration:
v1 (deprecated): Flat map of files
{
"version": "1.0.0",
"files": {
"agents/the-chief.md": { "size": 2048, "checksum": "sha256:..." }
}
}v2 (current): Categorized arrays with metadata
{
"version": "2.0.0",
"install_date": "2025-10-06T10:00:00Z",
"categories": {
"agents": [
{ "path": "agents/the-chief.md", "size": 2048, "checksum": "sha256:..." }
]
}
}Migration happens automatically on read via LockManager.migrateLockFile().
Key Implementation Details
File Path Handling
- Installation paths support
~expansion for home directory - Project-local installation uses
.the-startupdirectory - Claude configuration expected at
~/.claude - All paths use
path.join()for cross-platform compatibility
Placeholder Replacement
Templates use placeholders that are replaced during installation:
{{STARTUP_PATH}}: Installation directory path{{CLAUDE_PATH}}: Claude configuration directory
Rollback Mechanism
The installer implements atomic operations with full rollback:
- Tracks all installed files during installation
- Creates backup of settings.json before modification
- On any failure: deletes all installed files, restores settings backup
- Ensures system is in clean state after failed installation
Error Handling
- Custom error types with specific messages (ENOENT, EACCES, ENOSPC)
- Installation validates paths and provides clear error messages
- Settings merger handles JSON parse errors gracefully
- Lock file migration handles both v1 and v2 formats
Testing Strategy
- Unit tests for all core modules (Installer, LockManager, SettingsMerger, etc.)
- Integration tests for full installation/uninstall workflows
- UI tests using ink-testing-library for React components
- Migration test from v1 to v2 lock file format
- Real-file integration tests using actual assets for verification
Distribution
The project is distributed as an npm package:
- Published to npm registry
- Installed globally:
npm install -g the-agentic-startup - Or used via npx:
npx the-agentic-startup install - Assets are included in the npm package (not embedded at build time)
- Main entry point:
dist/index.js(built from TypeScript) - Standalone executables:
dist/bin/spec.js- Available asthe-agentic-startup-speccommand
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

