safe-feature-addition
Elite guide for shipping features without breaking production. Universal patterns for JS, TS, Python, Go, Rust, and more. Implements "Additive over Destructive" development, Unified Safety Auditing, and Feature Flags.
Best use case
safe-feature-addition is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Elite guide for shipping features without breaking production. Universal patterns for JS, TS, Python, Go, Rust, and more. Implements "Additive over Destructive" development, Unified Safety Auditing, and Feature Flags.
Teams using safe-feature-addition should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/safe-feature-addition/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How safe-feature-addition Compares
| Feature / Agent | safe-feature-addition | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Elite guide for shipping features without breaking production. Universal patterns for JS, TS, Python, Go, Rust, and more. Implements "Additive over Destructive" development, Unified Safety Auditing, and Feature Flags.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 🛡️ Safe Feature Addition: Ship Without Breaking
## What This Does
This skill provides a **Universal Safety Net** for adding new features to production systems across any framework or language. It implements an **"Additive Development"** philosophy where new code lives alongside old code, protected by feature flags and gradual rollouts.
> [!IMPORTANT]
> **The Golden Rule:** Always favor *additive* changes over *destructive* modifications. Existing code should remain untouched and functional.
---
## 🏗️ The Production Toolkit
This skill is powered by a unified safety engine compatible with **JS, TS, Python, Go, Rust, and Ruby**:
| Tool | Purpose |
|------|---------|
| `safe-feature verify` | Ensures all flags in code are defined in config. |
| `safe-feature audit` | Scans git diff for destructive changes (signature breaks). |
| `feature-flags.yml` | Central configuration for feature toggles. |
---
## 🚀 Step 1: Additive Development (Universal)
Instead of changing an existing function, extend it or create a new one.
### JavaScript / TypeScript
```javascript
// ✅ ELITE & ADDITIVE - Backward compatible
function processPayment(amount, method = 'credit-card') {
if (method === 'crypto') return crypto(amount);
return legacyPayment(amount);
}
```
### Python
```python
# ✅ ELITE & ADDITIVE - Backward compatible
def process_payment(amount, method='credit_card'):
if method == 'crypto': return crypto(amount)
return legacy_payment(amount)
```
---
## 🚩 Step 2: Feature Flags (The Kill Switch)
Wrap all new logic in feature flags. This allows you to deploy code to production while it is still "dormant".
### 1. Define the Flag (YAML/JSON)
```yaml
# feature-flags.yml
new_feature_v2:
enabled: false
rollout_percentage: 0 # Start at 0% traffic
```
### 2. Guard the Code
```typescript
// Works in React, Vue, Svelte, etc.
if (flags.isEnabled('new-feature-v2', user.id)) {
return <NewComponent />;
}
return <LegacyComponent />;
```
### 3. Verify Deployment
Before you ship, run the safety check to ensure config matches code:
```bash
python scripts/safe-feature.py verify --path ./src --config ./feature-flags.yml
```
---
## 🔍 Step 3: Git Safety Audit
Before merging your PR, run the **Universal Safety Auditor** to detect destructive changes that might break production.
```bash
# Audits your current branch against master/main
python scripts/safe-feature.py audit --base main
```
**The Auditor detects:**
- Modified function signatures without default values.
- New code blocks without feature flag guards.
- Potential "Big Bang" changes that increase risk.
---
## 📈 Step 4: Gradual Rollout (Canary Schedule)
Never switch a feature to 100% on Day 1. Use an industry-standard gradual schedule:
| Phase | Traffic | Duration | Goal |
|-------|---------|----------|------|
| **Canary** | 5% | 1 hour | Check for smoke/crash loops |
| **Early Bird** | 25% | 1 day | Check for performance bugs |
| **Rollout** | 50% | 2 days | Monitor business metrics |
| **GA** | 100% | Permanent | Complete the rollout |
---
## 🛠️ Performance & Safety Checklist
- [ ] Is the change **additive**? (Yes/No)
- [ ] Is there a **Feature Flag**? (Yes/No)
- [ ] Did you run `safe-feature verify`? (Yes/No)
- [ ] Is the **Database Migration** backward-compatible? (Yes/No)
- [ ] Is there a **Kill Switch**? (Yes/No)
---
**Success = Zero Downtime + Instant Rollback.** 🚀Related Skills
team-feature
Launch Agent Team for feature implementation with review gates (coders + specialized reviewers + tech lead)
safety
Git, command, Kubernetes, data, workspace, and temporary files safety rules. Use when committing, pushing, using kubectl, handling multi-repo workspaces, or performing destructive operations.
recovery-feature-scaffold
Scaffold complete features for the Steps to Recovery app including database schema, encrypted storage, offline sync, React Query hooks, screens, and tests. Use when adding new data models (gratitude lists, resentments, daily inventory), creating new journaling features, building step work tools, or implementing any new feature requiring SQLite + Supabase sync.
full-stack-orchestration-full-stack-feature
Use when working with full stack orchestration full stack feature
feature-slicing
Apply Feature-Sliced Design (FSD) architecture to frontend projects. Use when creating new frontend features, components, pages, or restructuring existing code. Triggers on tasks involving React/Next.js/Vue project organization, layer architecture, feature isolation, module boundaries, or when user mentions FSD, feature slicing, or scalable frontend structure.
feature-sliced-design
Apply Feature-Sliced Design (FSD) v2.1 architectural methodology to frontend projects. Use when organizing code structure, decomposing features, creating new components or features, refactoring existing codebases, or when users mention "FSD", "Feature-Sliced", layers, slices, or frontend architecture patterns.
feature-dev
Develop new features from requirements, specifications, or user stories following the full DevinClaw SDLC pipeline. Use this skill when implementing new microservices, API endpoints, UI components, or application features for the enterprise modernized applications, when building from an OpenAPI spec or Figma design, or when executing a complete SDD-to-delivery workflow for any new functionality.
dobacksoft-stabilsafe
Enforces DobackSoft/StabilSafe V3 conventions: API via frontend/src/config/api.ts, logger (no console.log), organizationId on requests, ports 9998/5174, iniciar.ps1 as sole startup, Windows/PowerShell, immutable menu modules, PDF export flow. Use when editing backend, frontend, or docs in this repo or when the user mentions DobackSoft, StabilSafe, iniciar.ps1, or project rules.
add-feature
Scaffold a new frontend feature module with page, components, API service, and hooks
Clarify Epic/Feature/UserStory/Task ticketing guidance in SKILL
No description provided.
rust-unsafe
不安全代码与 FFI 专家。处理 unsafe, raw pointer, FFI, extern, transmute, *mut, *const, union, #[repr(C)], libc, MaybeUninit, NonNull, SAFETY comment, soundness, undefined behavior, UB, 安全抽象, 裸指针, 外部函数接口, 内存布局, 未定义行为
obsidian-additions
Create supplementary materials attached to existing notes: experiments, meetings, reports, logs, conspectuses, practice sessions, annotations, AI outputs, links collections. Two-step process: (1) create aggregator space, (2) create concrete addition in base/additions/. INVOKE when user wants to attach any supplementary material to an existing note. Triggers: "addition", "create addition", "experiment", "meeting notes", "report", "conspectus", "log", "practice", "annotations", "links", "link collection", "аддишн", "конспект", "встреча", "отчёт", "эксперимент", "практика", "аннотации", "ссылки", "добавь к заметке".