sdf-setup
Scannednpx machina-cli add skill caiobrian/sdf-skills/sdf-setup --openclawSDF Setup — Project Constitution
Initialize foundational artifacts: .claude/CLAUDE.md and LessonsLearned.md.
Process
Step 1: Analyze the codebase
Examine: stack, framework, bundler, runtime, code patterns, test framework, linters/formatters, folder structure, package scripts.
If the project is empty, ask for preferences.
Step 2: Generate .claude/CLAUDE.md
Keep under 60 lines. Do NOT include what linters already enforce.
# Project Constitution
## Stack
- [detected]
- Prohibited: [what NOT to use]
## Tech Decisions
- [e.g., Data fetching: TanStack Query, never fetch + useEffect]
## Code Conventions
- [extracted from codebase]
## Quality Standards
- [from linter/formatter configs]
## Prohibited Actions
- Never install new dependencies without explicit approval
## Folder Structure
- [mapped from project]
## Commands
- Build: [cmd]
- Test: [cmd]
- Lint: [cmd]
Step 3: Generate LessonsLearned.md
# Lessons Learned
<!-- Format: LL-XXX: Title | Context | Rule | Date -->
Step 4: Confirm
Present output and ask (in the user's preferred language):
- If any important convention is missing
- If there are any specific prohibitions
Rules
- Detect patterns from REAL codebase, never assume defaults
- Always communicate in the user's preferred language
Source
git clone https://github.com/caiobrian/sdf-skills/blob/main/skills/sdf-setup/SKILL.mdView on GitHub Overview
SDF Setup initializes project constitution by creating CLAUDE.md and LessonsLearned.md for the SDF workflow. It activates when onboarding a new repository, starting a new project, or when no CLAUDE.md exists.
How This Skill Works
The skill analyzes the codebase to detect stack, framework, tooling, folder structure, test setup, and conventions. It then generates .claude/CLAUDE.md capturing key decisions, standards, and folder mappings, followed by a LessonsLearned.md skeleton. If the repository is empty, it prompts for user preferences before proceeding.
When to Use It
- Onboarding a new repository into SDF
- Starting a new project from scratch
- No CLAUDE.md exists in the project
- Monorepo or multi-package repo setup
- Reinforcing standards before major refactors
Quick Start
- Step 1: Analyze the codebase to detect stack, tooling, and folder structure
- Step 2: Generate .claude/CLAUDE.md with sections and keep it under 60 lines; omit enforced lint rules
- Step 3: Create LessonsLearned.md skeleton and present outputs for your review in your preferred language
Best Practices
- Detect patterns directly from the real codebase rather than assumptions
- Keep CLAUDE.md concise, target under 60 lines
- Do not duplicate existing lint or formatter rules; cite current configs instead
- Accurately map folder structure, commands, and build/test scripts
- Use the Confirm step to validate conventions with the team (preferred language)
Example Use Cases
- Onboarding a new React + Node project
- Bootstrapping a Python data processing repo without CLAUDE.md
- Initializing a monorepo with multiple packages
- Refactoring a legacy project to align with SDF standards
- Setting up a microservices project with service boundaries