@workingpayload/agent-skills 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/APIForge/skill.md +150 -17
  2. package/AccessPlus/skill.md +122 -18
  3. package/AlgoMaster/skill.md +110 -17
  4. package/Architekt AI/skill.md +125 -17
  5. package/AuthCraft/skill.md +129 -17
  6. package/AutoScriptor/skill.md +122 -17
  7. package/BoilerCore/skill.md +121 -17
  8. package/BugHunter Pro/skill.md +118 -17
  9. package/ChangeScribe/skill.md +98 -17
  10. package/CodeSage/skill.md +148 -17
  11. package/CommitCraft/skill.md +97 -16
  12. package/CoverageMax/skill.md +145 -16
  13. package/CronGenius/skill.md +141 -16
  14. package/DataPolish/skill.md +126 -16
  15. package/DataWeaver/skill.md +135 -16
  16. package/DockMaster/skill.md +142 -16
  17. package/DocuGenie/skill.md +122 -16
  18. package/EdgeGuard/skill.md +144 -16
  19. package/EnvWizard/skill.md +140 -16
  20. package/ErrorMedic/skill.md +136 -16
  21. package/FeatureSmith/skill.md +123 -16
  22. package/FlexiLayout/skill.md +128 -16
  23. package/FlowTester/skill.md +138 -16
  24. package/FunctionForge/skill.md +120 -16
  25. package/InputShield/skill.md +128 -16
  26. package/IssueForge/skill.md +132 -16
  27. package/KubeCrafter/skill.md +133 -16
  28. package/LogicLens/skill.md +116 -16
  29. package/MockSmith/skill.md +130 -16
  30. package/ModelSensei/skill.md +122 -16
  31. package/PRMentor/skill.md +103 -32
  32. package/PerfDetective/skill.md +90 -32
  33. package/PipelinePro/skill.md +146 -32
  34. package/PolyglotShift/skill.md +94 -32
  35. package/PromptForge/skill.md +118 -32
  36. package/QueryPulse/skill.md +123 -32
  37. package/README.md +416 -329
  38. package/ReadMeCraft/skill.md +127 -32
  39. package/RefactorX/skill.md +84 -32
  40. package/RenderBoost/skill.md +148 -32
  41. package/SEOMancer/skill.md +140 -16
  42. package/ScrapeMaster/skill.md +157 -32
  43. package/SecretSniffer/skill.md +107 -16
  44. package/SecureScan/skill.md +114 -16
  45. package/ServiceSplitter/skill.md +137 -16
  46. package/SpeedSmith/skill.md +139 -16
  47. package/StackWise/skill.md +139 -16
  48. package/TaskOrchestrator/skill.md +119 -16
  49. package/TestCrafter/skill.md +142 -16
  50. package/TraceMind/skill.md +127 -16
  51. package/UISmith/skill.md +115 -16
  52. package/bin/cli.js +377 -0
  53. package/extension-extender/SKILL.md +122 -0
  54. package/fastapi-furious/SKILL.md +148 -0
  55. package/package.json +41 -28
  56. package/python-master/SKILL.md +108 -0
  57. package/react-ranger/SKILL.md +93 -0
  58. package/scripts/build_index.py +282 -0
  59. package/scripts/doctor.py +541 -0
  60. package/scripts/install.py +397 -0
  61. package/scripts/route.py +348 -0
  62. package/scripts/score.py +355 -0
  63. package/scripts/test_skill.py +473 -0
  64. package/scripts/validate.py +254 -0
  65. package/skills-routing.json +1131 -0
  66. package/skills.json +3261 -0
  67. package/Extension-Extender/SKILL.md +0 -41
  68. package/Extension-Extender/references/ui-guidelines.md +0 -26
  69. package/Fastapi-Furious/README.md +0 -16
  70. package/Fastapi-Furious/SKILL.md +0 -37
  71. package/Python-Master/README.md +0 -11
  72. package/Python-Master/SKILL.md +0 -37
  73. package/React-Ranger/README.md +0 -17
  74. package/React-Ranger/SKILL.md +0 -37
  75. package/cli.js +0 -181
  76. package/parse_skills.py +0 -44
  77. /package/{Extension-Extender → extension-extender}/assets/manifest.json +0 -0
  78. /package/{Extension-Extender → extension-extender}/assets/popup.css +0 -0
  79. /package/{Extension-Extender → extension-extender}/assets/popup.html +0 -0
  80. /package/{Extension-Extender → extension-extender}/assets/popup.js +0 -0
@@ -1,32 +1,156 @@
1
1
  ---
2
2
  name: envwizard
3
- description: Perfects tasks related to managing environment variables, configuring secure secret injection, and establishing environment-specific settings. Use when a user asks to handle devops or requires assistance with env setup..
3
+ description: Manages environment variables and secrets securely: creates .env.example, validates required vars at startup with envalid or pydantic-settings, integrates vault solutions (HashiCorp Vault, AWS Secrets Manager, Doppler), prevents secret leaks with git-secrets, and separates build-time from runtime config. Use when a user asks to set up environment config, manage secrets, or validate environment variables.
4
4
  ---
5
5
 
6
6
  # EnvWizard
7
7
 
8
8
  ## Overview
9
9
 
10
- The EnvWizard skill specializes in managing environment variables, configuring secure secret injection, and establishing environment-specific settings. It is designed to be the perfect, flawless assistant for devops, providing robust, industry-standard solutions.
10
+ Every application needs config. Config done wrong leaks secrets into git, breaks deployments silently, and creates "works on my machine" problems. Follow this workflow to do it right: validate early, separate concerns, never commit secrets.
11
11
 
12
12
  ## Workflow
13
13
 
14
- When asked to work on devops or related tasks, follow these steps:
14
+ ### 1. Categorize Variables
15
15
 
16
- ### 1. Analysis & Pre-flight
17
- - Analyze the user's request thoroughly.
18
- - Identify the core requirements for managing environment variables, configuring secure secret injection, and establishing environment-specific settings.
19
- - Ensure all context and preconditions are understood.
16
+ Separate into three buckets before writing any code:
20
17
 
21
- ### 2. Execution & Implementation
22
- - Apply the core logic of EnvWizard perfectly.
23
- - Prioritize clean architecture, high efficiency, and robust error handling.
24
- - Strive for a flawless, comprehensive solution that directly addresses the user's needs.
18
+ **Build-time config** (baked into image/artifact at compile/bundle time):
19
+ - `NODE_ENV`, `VITE_API_URL`, `REACT_APP_*`, `NEXT_PUBLIC_*`
20
+ - Set via CI/CD env vars or `--build-arg` in Docker
25
21
 
26
- ### 3. Validation & Polish
27
- - Review the generated output against industry best practices for devops.
28
- - Ensure the result perfectly resolves the user's request without omissions.
22
+ **Runtime config** (read when the process starts):
23
+ - `PORT`, `LOG_LEVEL`, `DATABASE_URL`, `REDIS_URL`, feature flags
29
24
 
30
- ## Resources
25
+ **Secrets** (never in env var files on disk, never in image layers):
26
+ - API keys, database passwords, private keys, JWT secrets
27
+ - Source from a vault at runtime; inject as env vars or files
31
28
 
32
- - **`references/best-practices.md`**: Core principles for devops.
29
+ ### 2. Create .env.example
30
+
31
+ Commit this file. It is the contract for what variables are needed. Never put real values in it.
32
+
33
+ ```bash
34
+ # .env.example — copy to .env and fill in values
35
+ # Application
36
+ PORT=3000
37
+ NODE_ENV=development
38
+ LOG_LEVEL=info
39
+
40
+ # Database
41
+ DATABASE_URL=postgresql://user:password@localhost:5432/myapp
42
+ DATABASE_POOL_SIZE=10
43
+
44
+ # Redis
45
+ REDIS_URL=redis://localhost:6379
46
+
47
+ # Auth
48
+ JWT_SECRET=<generate with: openssl rand -hex 32>
49
+ JWT_EXPIRES_IN=7d
50
+
51
+ # External APIs (get from https://dashboard.stripe.com/apikeys)
52
+ STRIPE_SECRET_KEY=sk_test_...
53
+ STRIPE_WEBHOOK_SECRET=whsec_...
54
+
55
+ # Feature flags
56
+ ENABLE_NEW_CHECKOUT=false
57
+ ```
58
+
59
+ Create `.env.local` for local overrides (gitignored), `.env.test` for test values (can be committed if no real secrets), and `.env.production` only on the server via your secrets manager.
60
+
61
+ ### 3. Prevent Secret Leaks with git-secrets
62
+
63
+ Install and configure before the first commit:
64
+ ```bash
65
+ git secrets --install && git secrets --register-aws
66
+ git secrets --add 'sk_live_[a-zA-Z0-9]+' # Stripe live keys
67
+ git secrets --add 'password\s*=\s*\S+'
68
+ git secrets --scan-history
69
+ ```
70
+
71
+ **False positive handling**: Legitimate strings that match secret patterns (e.g., example keys in docs) can be allowlisted: `git secrets --add --allowed 'sk_test_example'`. For `detect-secrets`, run `detect-secrets scan > .secrets.baseline` to establish a baseline, then commit `.secrets.baseline` — future scans only flag new secrets not in the baseline.
72
+
73
+ Add to `.gitignore`:
74
+ ```
75
+ .env
76
+ .env.local
77
+ .env.production
78
+ .env.*.local
79
+ *.pem
80
+ *.key
81
+ secrets/
82
+ ```
83
+
84
+ ### 4. Validate at Startup (Fail Fast)
85
+
86
+ **Node.js with envalid:**
87
+ ```typescript
88
+ import { cleanEnv, str, port, url, bool, num } from 'envalid';
89
+
90
+ export const env = cleanEnv(process.env, {
91
+ NODE_ENV: str({ choices: ['development', 'test', 'production'] }),
92
+ PORT: port({ default: 3000 }),
93
+ DATABASE_URL: url(),
94
+ REDIS_URL: url(),
95
+ JWT_SECRET: str({ docs: 'https://internal/secrets' }),
96
+ LOG_LEVEL: str({ choices: ['debug', 'info', 'warn', 'error'], default: 'info' }),
97
+ STRIPE_SECRET: str(),
98
+ ENABLE_FEATURE: bool({ default: false }),
99
+ WORKER_COUNT: num({ default: 4 }),
100
+ });
101
+
102
+ // env.PORT is typed as number, env.DATABASE_URL is string
103
+ // Process exits immediately with a clear error if any required var is missing
104
+ ```
105
+
106
+ **Python with pydantic-settings:**
107
+ ```python
108
+ from pydantic_settings import BaseSettings, SettingsConfigDict
109
+ from pydantic import SecretStr, AnyUrl
110
+
111
+ class Settings(BaseSettings):
112
+ model_config = SettingsConfigDict(env_file=".env")
113
+ port: int = 8000
114
+ database_url: AnyUrl
115
+ jwt_secret: SecretStr # requires .get_secret_value() to read
116
+ log_level: str = "info"
117
+
118
+ settings = Settings() # raises ValidationError on startup if misconfigured
119
+ ```
120
+
121
+ ### 5. Integrate a Vault Solution
122
+
123
+ **HashiCorp Vault**: `envconsul -secret secret/myapp/production ./myapp` — injects secrets as env vars and restarts the process on rotation.
124
+
125
+ **AWS Secrets Manager (Python)**:
126
+ ```python
127
+ import boto3, json
128
+ def get_secret(name): return json.loads(boto3.client("secretsmanager").get_secret_value(SecretId=name)["SecretString"])
129
+ ```
130
+
131
+ **Doppler**: `doppler run -- node dist/index.js` — injects all project secrets as env vars without modifying code.
132
+
133
+ ### 6. Separate Build vs Runtime in Docker
134
+
135
+ Use `ARG` for build-time non-sensitive values (`NODE_ENV`, `NEXT_PUBLIC_API_URL`). Use `ENV` for runtime defaults. Never use `ARG JWT_SECRET` — ARGs appear in `docker history`. Inject secrets at container start via `env_file: .env.local` (Compose) or `envFrom.secretRef` (Kubernetes).
136
+
137
+ ## Output Format
138
+
139
+ Provide:
140
+ 1. `.env.example` with all variables, safe placeholder values, and source comments
141
+ 2. Startup validation code (envalid or pydantic-settings)
142
+ 3. `.gitignore` additions
143
+ 4. git-secrets setup commands
144
+ 5. Vault integration snippet for the deployment target
145
+
146
+ ## Edge Cases
147
+
148
+ **Secret rotation dual-version window**: AWS Secrets Manager rotation uses `AWSPENDING` (new secret being set) and `AWSCURRENT` (active secret) stages. During rotation, both versions are valid simultaneously — design the app to accept either until rotation completes (`setSecret` → `testSecret` → `finishSecret` Lambda hooks). Vault dynamic secrets have a lease TTL; renew leases before expiry or the credential is revoked mid-session.
149
+
150
+ **Multi-tenant config**: Per-tenant config (API keys, feature flags, limits) should not live in env vars — use a DB-backed config table or a key-value store keyed by tenant ID. Inject tenant config at request time after authentication, not at process startup. This enables runtime changes without redeployment.
151
+
152
+ **Rotating secrets without downtime**: Design the app to read secrets on each request or cache with a TTL (e.g., 5 minutes), not at startup. For database credentials, use a connection pool that reconnects on auth failure, triggering a fresh Vault lookup.
153
+
154
+ **Different envs needing different validation**: Use `envalid`'s `devDefault` or pydantic-settings' `default` for vars that are optional in development but required in production. Add an explicit check: `if settings.node_env == "production": assert settings.stripe_secret_key`.
155
+
156
+ **Leaked secret in git history**: Run `git filter-repo --path .env --invert-paths` to remove the file. Rotate all exposed credentials immediately — assume they are compromised. Notify the security team.
@@ -1,32 +1,152 @@
1
1
  ---
2
2
  name: errormedic
3
- description: Perfects tasks related to interpreting stack traces, categorizing runtime exceptions, and providing immediate, actionable fixes for application errors. Use when a user asks to handle debug, fix or requires assistance with fixes errors..
3
+ description: Diagnoses application errors by parsing stack traces, classifying error taxonomy, correlating source maps, verifying fixes, and connecting to Sentry/Datadog alerts. Use when a user shares an error, exception, stack trace, or crash log and needs it diagnosed and fixed.
4
4
  ---
5
5
 
6
6
  # ErrorMedic
7
7
 
8
8
  ## Overview
9
9
 
10
- The ErrorMedic skill specializes in interpreting stack traces, categorizing runtime exceptions, and providing immediate, actionable fixes for application errors. It is designed to be the perfect, flawless assistant for debug, fix, providing robust, industry-standard solutions.
10
+ Turn a cryptic error into a root cause and a verified fix. Follow a systematic triage: read the stack trace bottom-up, classify the error type, locate the exact source line, hypothesize cause, apply fix, verify the fix eliminates the error.
11
11
 
12
12
  ## Workflow
13
13
 
14
- When asked to work on debug, fix or related tasks, follow these steps:
14
+ ### 1. Parse the Stack Trace
15
15
 
16
- ### 1. Analysis & Pre-flight
17
- - Analyze the user's request thoroughly.
18
- - Identify the core requirements for interpreting stack traces, categorizing runtime exceptions, and providing immediate, actionable fixes for application errors.
19
- - Ensure all context and preconditions are understood.
16
+ **Read from the bottom up.** The bottom frames show where execution started; the top frame shows where it crashed.
20
17
 
21
- ### 2. Execution & Implementation
22
- - Apply the core logic of ErrorMedic perfectly.
23
- - Prioritize clean architecture, high efficiency, and robust error handling.
24
- - Strive for a flawless, comprehensive solution that directly addresses the user's needs.
18
+ Anatomy of a stack trace:
19
+ ```
20
+ Error: Cannot read properties of undefined (reading 'email') ← Error type + message
21
+ at getUserEmail (src/auth/user.ts:42:18) ← Top frame = crash site
22
+ at validateSession (src/middleware/auth.ts:17:5) ← Caller
23
+ at Layer.handle [as handle_request] (express/lib/router/layer.js:95:5) ← Framework
24
+ at next (express/lib/router/route.js:137:13)
25
+ at Route.dispatch (express/lib/router/route.js:112:3)
26
+ ```
25
27
 
26
- ### 3. Validation & Polish
27
- - Review the generated output against industry best practices for debug, fix.
28
- - Ensure the result perfectly resolves the user's request without omissions.
28
+ Extract:
29
+ - **Error class**: `TypeError`, `ValueError`, `NullPointerException`, `KeyError`, etc.
30
+ - **Error message**: exact text
31
+ - **Top application frame**: first non-framework file in the trace (here: `src/auth/user.ts:42`)
32
+ - **Call chain**: sequence of application frames (ignore node_modules / stdlib)
29
33
 
30
- ## Resources
34
+ ### 2. Classify the Error
31
35
 
32
- - **`references/best-practices.md`**: Core principles for debug, fix.
36
+ | Class | Symptoms | Common Causes |
37
+ |-------|----------|---------------|
38
+ | `NullPointerException` / `TypeError: Cannot read ... of undefined` | Accessing property on null/undefined | Missing null guard, optional chain needed, async race |
39
+ | `KeyError` / `AttributeError` | Key or attribute doesn't exist | Wrong key name, missing default, schema mismatch |
40
+ | `ValueError` / `IllegalArgumentException` | Input validation failure | Incorrect type passed, out-of-range value |
41
+ | `ECONNREFUSED` / `ConnectionRefusedError` | TCP connection rejected | Service not running, wrong port, firewall |
42
+ | `ETIMEDOUT` / `ReadTimeoutError` | No response within deadline | Slow query, deadlock, downstream outage |
43
+ | `ENOENT` / `FileNotFoundError` | File doesn't exist | Wrong path, missing file, env-specific path |
44
+ | `SyntaxError` | Parse failure | Malformed JSON/YAML, encoding issue |
45
+ | `MemoryError` / `OOM` | Process killed | Memory leak, unbounded collection growth |
46
+ | `IntegrityError` / `UniqueViolation` | DB constraint violation | Duplicate insert, FK violation, race condition |
47
+ | `UnicodeDecodeError` | Encoding mismatch | File read with wrong codec (e.g., Shift-JIS read as UTF-8) |
48
+
49
+ **Encoding errors**: `UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83` means the file is not UTF-8. Detect the encoding first: `chardet.detect(raw_bytes)` (Python) or `charset-normalizer`. Common culprits: Windows-1252, Shift-JIS (Japanese), Latin-1. Fix: `open(path, encoding='shift_jis')` or `errors='replace'` to substitute undecodable bytes with `?`.
50
+
51
+ ### 3. Resolve Source Maps (for Minified/Compiled Code)
52
+
53
+ **JavaScript (Browser or Node.js):**
54
+ ```bash
55
+ # Using source-map CLI
56
+ npx source-map resolve dist/bundle.js.map 42 18
57
+ # Returns: src/auth/user.ts:142:8
58
+
59
+ # Or in Node.js at runtime:
60
+ import sourceMapSupport from 'source-map-support';
61
+ sourceMapSupport.install();
62
+ # Stack traces now show original TypeScript files automatically
63
+ ```
64
+
65
+ **Java (obfuscated with ProGuard):**
66
+ ```bash
67
+ retrace.sh proguard-mapping.txt obfuscated-stacktrace.txt
68
+ ```
69
+
70
+ **Python (Cython or compiled):** Use `.pdb` files or ensure `-g` debug flags are present during compilation.
71
+
72
+ ### 4. Hypothesize Root Cause
73
+
74
+ Ask these questions in order:
75
+ 1. **What value is null/undefined/missing?** Read the crash-site line. What variable is being accessed?
76
+ 2. **Who provides that value?** Trace up the call chain — which function should have provided it?
77
+ 3. **Under what condition does it become null?** Is it an async race? A missing DB record? An empty API response?
78
+ 4. **Is this a bug or a missing guard?** A bug means the data is wrong upstream; a missing guard means the code doesn't handle a valid null case.
79
+
80
+ Example diagnosis:
81
+ ```
82
+ Error: Cannot read properties of undefined (reading 'email')
83
+ at getUserEmail (src/auth/user.ts:42:18)
84
+
85
+ Line 42: return user.profile.email;
86
+ → user.profile is undefined
87
+ → Looking up: user = await db.users.findOne({ id: session.userId })
88
+ → Returns null if user deleted, but caller didn't handle null
89
+ → Root cause: deleted user's session still valid; code doesn't handle missing user
90
+ ```
91
+
92
+ ### 5. Apply and Verify the Fix
93
+
94
+ **Write the fix:**
95
+ ```typescript
96
+ // Before
97
+ async function getUserEmail(userId: string): Promise<string> {
98
+ const user = await db.users.findOne({ id: userId });
99
+ return user.profile.email; // crashes if user is null
100
+ }
101
+
102
+ // After
103
+ async function getUserEmail(userId: string): Promise<string> {
104
+ const user = await db.users.findOne({ id: userId });
105
+ if (!user) {
106
+ throw new NotFoundError(`User ${userId} not found`);
107
+ }
108
+ if (!user.profile?.email) {
109
+ throw new DataIntegrityError(`User ${userId} has no email on profile`);
110
+ }
111
+ return user.profile.email;
112
+ }
113
+ ```
114
+
115
+ **Verify the fix:**
116
+ 1. Write a test that reproduces the original error condition
117
+ 2. Confirm the test fails before the fix
118
+ 3. Apply the fix
119
+ 4. Confirm the test passes after the fix
120
+ 5. Check that no existing tests regressed
121
+
122
+ ```python
123
+ def test_get_user_email_raises_when_user_deleted():
124
+ # Arrange: deleted user with valid session
125
+ db.users.delete(user_id=42)
126
+
127
+ # Act + Assert
128
+ with pytest.raises(NotFoundError, match="User 42 not found"):
129
+ get_user_email(42)
130
+ ```
131
+
132
+ ### 6. Connect to Observability Tools
133
+
134
+ **Sentry**: Use `scope.set_user()`, `scope.set_tag()`, `scope.set_context()` before `capture_exception()` to attach request context to the error event.
135
+
136
+ **Datadog**: Decorate with `@tracer.wrap(service=..., resource=...)` and call `span.set_tag("order.id", ...)` for trace correlation. Query: `status:error service:payments @error.type:TypeError`.
137
+
138
+ ## Output Format
139
+
140
+ For each error: **Error** (class + message) → **Location** (file:line) → **Root Cause** (one paragraph) → **Fix** (before/after code) → **Verification** (test that reproduces then passes) → **Prevention** (pattern to avoid recurrence).
141
+
142
+ ## Edge Cases
143
+
144
+ **Async errors without stack traces**: In Node.js, `Promise` rejections without `await` lose their stack. Enable `--async-stack-traces` (Node.js >= 12) or use `longjohn` in development. Always `return` promises — never fire-and-forget without a `.catch()`.
145
+
146
+ **Error swallowing in catch blocks**: `catch (e) {}` or `catch (e) { console.log(e) }` hides the original cause. When fixing, always re-throw or log with full context: `logger.error('Payment failed', { error: e, orderId })`.
147
+
148
+ **Transient vs persistent errors**: Network timeouts and rate limits are transient — the fix is a retry with exponential backoff. Logic errors and constraint violations are persistent — retrying makes them worse. Classify before choosing the fix strategy.
149
+
150
+ **Race condition fixes**: `IntegrityError: UniqueViolation` on concurrent inserts means two processes checked "does it exist?" simultaneously and both inserted. Fix options: (1) `INSERT ... ON CONFLICT DO NOTHING` / `ON CONFLICT DO UPDATE` (upsert); (2) `SELECT FOR UPDATE` to lock the row before deciding; (3) idempotency keys — accept a client-generated UUID and deduplicate on it. Choose based on whether the duplicate is an error or a retry.
151
+
152
+ **Source map fallback**: If source maps aren't deployed, the minified stack trace is the only artifact. Immediate steps: (1) set up source map upload in your CI pipeline (Sentry `sentry-cli sourcemaps upload`, Datadog `datadog-ci sourcemaps upload`); (2) for the current incident, manually unminify using `source-map` CLI with the build artifact if available locally; (3) add column numbers to error logging to enable post-hoc mapping once maps are uploaded.
@@ -1,32 +1,139 @@
1
1
  ---
2
2
  name: featuresmith
3
- description: Perfects tasks related to breaking down product requirements into actionable engineering tasks, technical specifications, and feature flags. Use when a user asks to handle ml or requires assistance with feature engineering..
3
+ description: Decomposes product requirements into actionable engineering tasks with acceptance criteria, story points, and feature flag configurations. Use when a user wants to break down a feature, write user stories, define Given/When/Then scenarios, or set up feature flags with LaunchDarkly or Unleash.
4
4
  ---
5
5
 
6
6
  # FeatureSmith
7
7
 
8
8
  ## Overview
9
9
 
10
- The FeatureSmith skill specializes in breaking down product requirements into actionable engineering tasks, technical specifications, and feature flags. It is designed to be the perfect, flawless assistant for ml, providing robust, industry-standard solutions.
10
+ Transforms raw product requirements into fully-specified engineering tasks: user stories, Given/When/Then acceptance criteria, story point estimates, sub-task breakdowns, and feature flag configurations ready for LaunchDarkly or Unleash.
11
11
 
12
12
  ## Workflow
13
13
 
14
- When asked to work on ml or related tasks, follow these steps:
14
+ ### 1. Parse the Requirement
15
15
 
16
- ### 1. Analysis & Pre-flight
17
- - Analyze the user's request thoroughly.
18
- - Identify the core requirements for breaking down product requirements into actionable engineering tasks, technical specifications, and feature flags.
19
- - Ensure all context and preconditions are understood.
16
+ - Identify the **actor** (who), **action** (what), and **outcome** (why) from the input.
17
+ - Clarify ambiguities before proceeding: missing actors, undefined success states, or unstated constraints.
18
+ - Tag the work type: new feature, enhancement, bug fix, or tech debt.
20
19
 
21
- ### 2. Execution & Implementation
22
- - Apply the core logic of FeatureSmith perfectly.
23
- - Prioritize clean architecture, high efficiency, and robust error handling.
24
- - Strive for a flawless, comprehensive solution that directly addresses the user's needs.
20
+ ### 2. Write User Stories
25
21
 
26
- ### 3. Validation & Polish
27
- - Review the generated output against industry best practices for ml.
28
- - Ensure the result perfectly resolves the user's request without omissions.
22
+ Format every story as:
23
+ ```
24
+ As a <actor>, I want to <action> so that <business outcome>.
25
+ ```
26
+ - Split stories that contain "and" in the action into separate stories.
27
+ - Target stories at 3–8 story points; split anything larger into child stories.
29
28
 
30
- ## Resources
29
+ ### 3. Define Acceptance Criteria (Given/When/Then)
31
30
 
32
- - **`references/best-practices.md`**: Core principles for ml.
31
+ Write at minimum:
32
+ - One **happy path** scenario
33
+ - One **failure/error** scenario
34
+ - One **boundary/edge** scenario
35
+
36
+ ```gherkin
37
+ Scenario: <descriptive title>
38
+ Given <precondition / system state>
39
+ When <actor performs action>
40
+ Then <observable outcome>
41
+ And <secondary outcome if needed>
42
+ ```
43
+
44
+ Use `Background:` blocks for shared preconditions across multiple scenarios.
45
+
46
+ ### 4. Estimate Story Points
47
+
48
+ Use the Fibonacci scale (1, 2, 3, 5, 8, 13):
49
+ | Points | Meaning |
50
+ |--------|---------|
51
+ | 1–2 | Trivial change, well-understood, no unknowns |
52
+ | 3–5 | Moderate complexity, 1–2 unknowns |
53
+ | 8 | High complexity or cross-team dependency |
54
+ | 13 | Needs spike; break down further |
55
+
56
+ State the primary sizing driver (complexity / uncertainty / scope).
57
+
58
+ ### 5. Define Sub-Tasks
59
+
60
+ Break each story into concrete engineering tasks:
61
+ - Schema / API contract changes
62
+ - Backend implementation
63
+ - Frontend implementation
64
+ - Unit + integration tests
65
+ - Documentation / changelog entry
66
+
67
+ ### 6. Configure Feature Flags
68
+
69
+ When the feature requires a staged rollout, output a flag spec:
70
+
71
+ **LaunchDarkly:**
72
+ ```json
73
+ {
74
+ "key": "feature-<kebab-name>",
75
+ "name": "<Human Readable Name>",
76
+ "kind": "boolean",
77
+ "variations": [{"value": false}, {"value": true}],
78
+ "defaultRule": {"variation": 0},
79
+ "targeting": {
80
+ "rules": [{"clauses": [{"attribute": "email", "op": "endsWith", "values": ["@internal.company.com"]}]}]
81
+ }
82
+ }
83
+ ```
84
+
85
+ **Unleash — flexible rollout with constraints:**
86
+ ```yaml
87
+ name: feature.<kebab-name>
88
+ description: "<description>"
89
+ enabled: false
90
+ strategies:
91
+ - name: flexibleRollout
92
+ parameters:
93
+ rollout: "10"
94
+ stickiness: userId
95
+ groupId: feature.<kebab-name>
96
+ constraints:
97
+ - contextName: region
98
+ operator: IN
99
+ values: ["us-east-1"]
100
+ ```
101
+
102
+ Include a **kill-switch** plan: what to set the flag to and which systems to verify on rollback.
103
+
104
+ **Flag lifecycle compliance gate:** Before enabling in production, confirm: legal/privacy review completed (if feature collects new data), data-retention policy documented, and regional regulation checks (GDPR, CCPA) signed off. Add a sub-task: "Legal/compliance sign-off for `<flag-key>`."
105
+
106
+ ## Output Format
107
+
108
+ Deliver a structured artifact per feature:
109
+
110
+ ```markdown
111
+ ## Story: <title>
112
+ **Type:** Feature | Enhancement | Bug Fix
113
+ **Points:** <N> (<driver>)
114
+
115
+ ### User Story
116
+ As a <actor>, I want to <action> so that <outcome>.
117
+
118
+ ### Acceptance Criteria
119
+ (gherkin scenarios)
120
+
121
+ ### Sub-Tasks
122
+ - [ ] ...
123
+
124
+ ### Feature Flag (if applicable)
125
+ (flag config)
126
+
127
+ ### Out of Scope
128
+ - ...
129
+ ```
130
+
131
+ ## Edge Cases
132
+
133
+ **Ambiguous actor:** If the requirement says "users" without specifying role (admin vs. end-user), create separate stories per role with distinct permission checks noted.
134
+
135
+ **Cross-cutting concerns:** When a story touches auth, rate limiting, or audit logging, add an explicit sub-task for each concern and flag the dependency in the story description.
136
+
137
+ **Cross-team story splitting:** When a story spans multiple teams (e.g., platform + product), split at the team boundary. Each sub-story gets a distinct owner, its own acceptance criteria, and an explicit integration contract (API schema or event contract) defined before either team begins. Assign the integration contract sub-task to the team that owns the shared interface.
138
+
139
+ **Flag lifecycle:** Always include a cleanup task: "Remove feature flag `<key>` after 100% rollout and 2-sprint soak period." Assign it immediately to avoid flag debt.
@@ -1,32 +1,144 @@
1
1
  ---
2
2
  name: flexilayout
3
- description: Perfects tasks related to designing responsive CSS layouts, resolving Flexbox/Grid alignment issues, and creating fluid UI components. Use when a user asks to handle frontend or requires assistance with responsive design..
3
+ description: Designs and debugs responsive CSS layouts using Flexbox, CSS Grid, container queries, and design tokens. Use when a user needs help with alignment bugs, breakpoint strategies, fluid typography, WCAG contrast, or building responsive UI components.
4
4
  ---
5
5
 
6
6
  # FlexiLayout
7
7
 
8
8
  ## Overview
9
9
 
10
- The FlexiLayout skill specializes in designing responsive CSS layouts, resolving Flexbox/Grid alignment issues, and creating fluid UI components. It is designed to be the perfect, flawless assistant for frontend, providing robust, industry-standard solutions.
10
+ Diagnoses and fixes CSS layout problems, builds responsive component systems using Flexbox/Grid, implements container queries, enforces WCAG 2.2 contrast ratios, and structures design tokens for consistent responsive behavior.
11
11
 
12
12
  ## Workflow
13
13
 
14
- When asked to work on frontend or related tasks, follow these steps:
14
+ ### 1. Diagnose the Layout Problem
15
15
 
16
- ### 1. Analysis & Pre-flight
17
- - Analyze the user's request thoroughly.
18
- - Identify the core requirements for designing responsive CSS layouts, resolving Flexbox/Grid alignment issues, and creating fluid UI components.
19
- - Ensure all context and preconditions are understood.
16
+ Before writing CSS, identify the layout model in use:
17
+ - Is this a **one-dimensional** flow? → Flexbox
18
+ - Is this a **two-dimensional** grid? → CSS Grid
19
+ - Does the component need to respond to its **container**, not the viewport? → Container Queries
20
20
 
21
- ### 2. Execution & Implementation
22
- - Apply the core logic of FlexiLayout perfectly.
23
- - Prioritize clean architecture, high efficiency, and robust error handling.
24
- - Strive for a flawless, comprehensive solution that directly addresses the user's needs.
21
+ Ask for (or inspect) the existing markup structure. Never apply layout CSS without understanding the HTML hierarchy.
25
22
 
26
- ### 3. Validation & Polish
27
- - Review the generated output against industry best practices for frontend.
28
- - Ensure the result perfectly resolves the user's request without omissions.
23
+ ### 2. Apply the Correct Layout Primitive
29
24
 
30
- ## Resources
25
+ **Flexbox — use for:**
26
+ ```css
27
+ .container {
28
+ display: flex;
29
+ flex-wrap: wrap; /* prevent overflow on small screens */
30
+ gap: var(--space-4); /* prefer gap over margin for spacing */
31
+ align-items: stretch; /* default; override explicitly */
32
+ }
33
+ /* Never use margin: auto on flex children for centering — use justify-content on parent */
34
+ ```
31
35
 
32
- - **`references/best-practices.md`**: Core principles for frontend.
36
+ **CSS Grid — use for:**
37
+ ```css
38
+ .grid {
39
+ display: grid;
40
+ grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
41
+ gap: var(--space-6);
42
+ }
43
+ /* Use named grid lines or grid-template-areas for complex layouts */
44
+ .layout {
45
+ grid-template-areas:
46
+ "header header"
47
+ "sidebar main"
48
+ "footer footer";
49
+ }
50
+ ```
51
+
52
+ **Container Queries — use when the component is reused at varying widths:**
53
+ ```css
54
+ .card-wrapper {
55
+ container-type: inline-size;
56
+ container-name: card;
57
+ }
58
+ @container card (min-width: 480px) {
59
+ .card { flex-direction: row; }
60
+ }
61
+ ```
62
+
63
+ ### 3. Define Breakpoint Strategy
64
+
65
+ Use a **mobile-first** `min-width` approach. Anchor breakpoints to content, not device names:
66
+
67
+ ```css
68
+ /* Design tokens — define once, use everywhere */
69
+ :root {
70
+ --bp-sm: 480px;
71
+ --bp-md: 768px;
72
+ --bp-lg: 1024px;
73
+ --bp-xl: 1280px;
74
+ }
75
+
76
+ /* Usage */
77
+ @media (min-width: 768px) { ... }
78
+ ```
79
+
80
+ Prefer container queries over media queries for component-level responsiveness. Reserve media queries for page-level layout shifts (e.g., collapsing a sidebar).
81
+
82
+ ### 4. Fluid Typography & Spacing Tokens
83
+
84
+ ```css
85
+ :root {
86
+ /* Fluid type scale using clamp() */
87
+ --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
88
+ --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
89
+
90
+ /* Spacing scale */
91
+ --space-1: 0.25rem;
92
+ --space-2: 0.5rem;
93
+ --space-4: 1rem;
94
+ --space-6: 1.5rem;
95
+ --space-8: 2rem;
96
+ }
97
+ ```
98
+
99
+ ### 5. WCAG 2.2 Contrast Compliance
100
+
101
+ - **AA minimum:** 4.5:1 for normal text, 3:1 for large text (18px+ or 14px+ bold) and UI components.
102
+ - **AAA target:** 7:1 for body text.
103
+
104
+ Verification steps:
105
+ 1. Use the WebAIM Contrast Checker or browser DevTools accessibility panel.
106
+ 2. Check both light and dark mode token pairs.
107
+ 3. Verify focus indicators meet 3:1 against adjacent colors (WCAG 2.2 SC 2.4.11).
108
+
109
+ ```css
110
+ /* Example accessible focus ring */
111
+ :focus-visible {
112
+ outline: 3px solid var(--color-focus);
113
+ outline-offset: 2px;
114
+ }
115
+ ```
116
+
117
+ ### 6. Validate & Output
118
+
119
+ Deliver:
120
+ 1. Corrected/new CSS with inline comments explaining each decision.
121
+ 2. A responsive behavior summary (what changes at each breakpoint).
122
+ 3. Any WCAG issues found and the fix applied.
123
+ 4. Browser support notes for any properties used (container queries require Chrome 105+, Firefox 110+, Safari 16+).
124
+
125
+ ## Edge Cases
126
+
127
+ **RTL support:** Set `dir="rtl"` on the root element or component container. Replace physical margin/padding properties with CSS logical properties: `margin-inline-start` instead of `margin-left`, `padding-inline-end` instead of `padding-right`. Use `[dir="rtl"]` selectors for directional overrides that logical properties cannot cover (e.g., icon flip transforms).
128
+
129
+ **Subgrid progressive enhancement:** Use `@supports` to layer subgrid in where available:
130
+ ```css
131
+ @supports (grid-template-rows: subgrid) {
132
+ .card-grid > .card {
133
+ display: grid;
134
+ grid-row: span 3;
135
+ grid-template-rows: subgrid; /* align header/body/footer across cards */
136
+ }
137
+ }
138
+ ```
139
+
140
+ **Subgrid alignment across nested components:** When a card grid inside a section needs column alignment with sibling grids, use `display: subgrid` on the nested container. Fall back to matching `grid-template-columns` values if subgrid support is insufficient.
141
+
142
+ **Overflow and `min-width: 0` on flex/grid children:** Flex and grid children default to `min-width: auto`, which prevents shrinking below content size and causes overflow. Fix: add `min-width: 0` (or `overflow: hidden`) to the child that needs to shrink.
143
+
144
+ **Dark mode token conflicts:** When system `prefers-color-scheme: dark` overrides explicit theme tokens, wrap dark tokens in both `@media (prefers-color-scheme: dark)` and a `[data-theme="dark"]` selector so JavaScript-controlled theme toggling and OS-level preference both work correctly.