@juho0719/cckit 0.2.6 → 0.2.8
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.
- package/README.md +88 -0
- package/dist/agents-AEKT67A6.js +9 -0
- package/dist/{chunk-T5VPG46W.js → chunk-3GUKEMND.js} +0 -5
- package/dist/{chunk-33CGM7PI.js → chunk-3Y26YU4R.js} +3 -7
- package/dist/{chunk-4NEXS2FY.js → chunk-5XOKKPAA.js} +0 -5
- package/dist/{chunk-6COBMJZ6.js → chunk-E3INXQNO.js} +1 -5
- package/dist/{chunk-ZBGGTONN.js → chunk-EYY2IZ7N.js} +3 -7
- package/dist/{chunk-H4YDYF2X.js → chunk-ID643AV4.js} +3 -7
- package/dist/{chunk-FLBB3OH4.js → chunk-K25UZZVG.js} +0 -5
- package/dist/{chunk-MSCXXA2X.js → chunk-KEENFBLL.js} +2 -6
- package/dist/{chunk-7VVGOZDZ.js → chunk-SW3OJLHC.js} +1 -5
- package/dist/{chunk-VN5S6JGZ.js → chunk-W63UKEIT.js} +0 -5
- package/dist/{chunk-52Q6TDAH.js → chunk-W7RWPDBH.js} +3 -7
- package/dist/claudemd-KKQ2DL7P.js +7 -0
- package/dist/cli-DABSKXWN.js +477 -0
- package/dist/commands-P5LILVZ5.js +9 -0
- package/dist/hooks-A2WQ2LGG.js +9 -0
- package/dist/index.js +17 -21
- package/dist/mcps-67Q7TBGW.js +6 -0
- package/dist/{paths-B754SP2D.js → paths-FT6KBIRD.js} +1 -2
- package/dist/{registry-6CLDID6R.js → registry-KRLOB4TH.js} +2 -3
- package/dist/rules-EFSJ3L3A.js +9 -0
- package/dist/skills-ULMW3UCM.js +8 -0
- package/dist/{uninstall-cli-XU7E26JX.js → uninstall-cli-GLYJG5V2.js} +2 -14
- package/package.json +2 -1
- package/assets/agents/architect.md +0 -211
- package/assets/agents/build-error-resolver.md +0 -114
- package/assets/agents/ccwin-code-reviewer.md +0 -224
- package/assets/agents/database-reviewer.md +0 -91
- package/assets/agents/doc-updater.md +0 -107
- package/assets/agents/e2e-runner.md +0 -107
- package/assets/agents/planner.md +0 -212
- package/assets/agents/python-reviewer.md +0 -98
- package/assets/agents/refactor-cleaner.md +0 -85
- package/assets/agents/security-reviewer.md +0 -108
- package/assets/agents/superpower-code-reviewer.md +0 -48
- package/assets/agents/tdd-guide.md +0 -80
- package/assets/commands/build-fix.md +0 -62
- package/assets/commands/checkpoint.md +0 -74
- package/assets/commands/code-review.md +0 -40
- package/assets/commands/e2e.md +0 -362
- package/assets/commands/eval.md +0 -120
- package/assets/commands/orchestrate.md +0 -172
- package/assets/commands/plan.md +0 -113
- package/assets/commands/python-review.md +0 -297
- package/assets/commands/refactor-clean.md +0 -80
- package/assets/commands/sessions.md +0 -305
- package/assets/commands/tdd.md +0 -326
- package/assets/commands/test-coverage.md +0 -69
- package/assets/commands/update-codemaps.md +0 -72
- package/assets/commands/update-docs.md +0 -84
- package/assets/commands/verify.md +0 -59
- package/assets/hooks/agent-track.sh +0 -53
- package/assets/hooks/auto-commit-push.sh +0 -123
- package/assets/hooks/on-prompt-start.sh +0 -6
- package/assets/hooks/post-edit-format.js +0 -48
- package/assets/hooks/post-edit-typecheck.js +0 -94
- package/assets/hooks/skill-track.sh +0 -26
- package/assets/hooks/subagent-notify.sh +0 -20
- package/assets/rules/common/agents.md +0 -49
- package/assets/rules/common/coding-style.md +0 -48
- package/assets/rules/common/git-workflow.md +0 -45
- package/assets/rules/common/hooks.md +0 -30
- package/assets/rules/common/patterns.md +0 -31
- package/assets/rules/common/performance.md +0 -55
- package/assets/rules/common/security.md +0 -29
- package/assets/rules/common/testing.md +0 -29
- package/assets/rules/python/coding-style.md +0 -42
- package/assets/rules/python/hooks.md +0 -19
- package/assets/rules/python/patterns.md +0 -39
- package/assets/rules/python/security.md +0 -30
- package/assets/rules/python/testing.md +0 -38
- package/assets/rules/typescript/coding-style.md +0 -18
- package/assets/rules/typescript/hooks.md +0 -19
- package/assets/rules/typescript/patterns.md +0 -39
- package/assets/rules/typescript/security.md +0 -30
- package/assets/rules/typescript/testing.md +0 -38
- package/assets/skills/api-design/SKILL.md +0 -522
- package/assets/skills/backend-patterns/SKILL.md +0 -597
- package/assets/skills/brainstorming/SKILL.md +0 -96
- package/assets/skills/coding-standards/SKILL.md +0 -529
- package/assets/skills/database-migrations/SKILL.md +0 -334
- package/assets/skills/deployment-patterns/SKILL.md +0 -426
- package/assets/skills/dispatching-parallel-agents/SKILL.md +0 -180
- package/assets/skills/docker-patterns/SKILL.md +0 -363
- package/assets/skills/e2e-testing/SKILL.md +0 -325
- package/assets/skills/eval-harness/SKILL.md +0 -235
- package/assets/skills/executing-plans/SKILL.md +0 -84
- package/assets/skills/finishing-a-development-branch/SKILL.md +0 -200
- package/assets/skills/frontend-patterns/SKILL.md +0 -641
- package/assets/skills/iterative-retrieval/SKILL.md +0 -210
- package/assets/skills/postgres-patterns/SKILL.md +0 -145
- package/assets/skills/python-patterns/SKILL.md +0 -749
- package/assets/skills/python-testing/SKILL.md +0 -815
- package/assets/skills/receiving-code-review/SKILL.md +0 -213
- package/assets/skills/requesting-code-review/SKILL.md +0 -105
- package/assets/skills/requesting-code-review/code-reviewer-template.md +0 -146
- package/assets/skills/subagent-driven-development/SKILL.md +0 -242
- package/assets/skills/subagent-driven-development/code-quality-reviewer-prompt.md +0 -20
- package/assets/skills/subagent-driven-development/implementer-prompt.md +0 -78
- package/assets/skills/subagent-driven-development/spec-reviewer-prompt.md +0 -61
- package/assets/skills/systematic-debugging/CREATION-LOG.md +0 -114
- package/assets/skills/systematic-debugging/SKILL.md +0 -296
- package/assets/skills/systematic-debugging/condition-based-waiting-example.ts +0 -158
- package/assets/skills/systematic-debugging/condition-based-waiting.md +0 -115
- package/assets/skills/systematic-debugging/defense-in-depth.md +0 -122
- package/assets/skills/systematic-debugging/root-cause-tracing.md +0 -169
- package/assets/skills/systematic-debugging/scripts/find-polluter.sh +0 -63
- package/assets/skills/systematic-debugging/test-academic.md +0 -14
- package/assets/skills/systematic-debugging/test-pressure-1.md +0 -58
- package/assets/skills/systematic-debugging/test-pressure-2.md +0 -68
- package/assets/skills/systematic-debugging/test-pressure-3.md +0 -69
- package/assets/skills/tdd-workflow/SKILL.md +0 -409
- package/assets/skills/test-driven-development/SKILL.md +0 -371
- package/assets/skills/test-driven-development/testing-anti-patterns.md +0 -299
- package/assets/skills/using-git-worktrees/SKILL.md +0 -218
- package/assets/skills/verification-before-completion/SKILL.md +0 -139
- package/assets/skills/verification-loop/SKILL.md +0 -125
- package/assets/skills/writing-plans/SKILL.md +0 -116
- package/assets/statusline/statusline.sh +0 -186
- package/dist/agents-LI3AHTTX.js +0 -10
- package/dist/chunk-TLOORH3N.js +0 -50
- package/dist/claudemd-NWG63O2G.js +0 -8
- package/dist/cli-KHRWBZPV.js +0 -2735
- package/dist/commands-UAOYWGUX.js +0 -10
- package/dist/hooks-NONUWI6V.js +0 -10
- package/dist/mcps-ISPG3F7T.js +0 -7
- package/dist/rules-GZEAGCSL.js +0 -10
- package/dist/skills-ML3QLXUK.js +0 -9
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# Git Workflow
|
|
2
|
-
|
|
3
|
-
## Commit Message Format
|
|
4
|
-
|
|
5
|
-
```
|
|
6
|
-
<type>: <description>
|
|
7
|
-
|
|
8
|
-
<optional body>
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
Types: feat, fix, refactor, docs, test, chore, perf, ci
|
|
12
|
-
|
|
13
|
-
Note: Attribution disabled globally via ~/.claude/settings.json.
|
|
14
|
-
|
|
15
|
-
## Pull Request Workflow
|
|
16
|
-
|
|
17
|
-
When creating PRs:
|
|
18
|
-
1. Analyze full commit history (not just latest commit)
|
|
19
|
-
2. Use `git diff [base-branch]...HEAD` to see all changes
|
|
20
|
-
3. Draft comprehensive PR summary
|
|
21
|
-
4. Include test plan with TODOs
|
|
22
|
-
5. Push with `-u` flag if new branch
|
|
23
|
-
|
|
24
|
-
## Feature Implementation Workflow
|
|
25
|
-
|
|
26
|
-
1. **Plan First**
|
|
27
|
-
- Use **planner** agent to create implementation plan
|
|
28
|
-
- Identify dependencies and risks
|
|
29
|
-
- Break down into phases
|
|
30
|
-
|
|
31
|
-
2. **TDD Approach**
|
|
32
|
-
- Use **tdd-guide** agent
|
|
33
|
-
- Write tests first (RED)
|
|
34
|
-
- Implement to pass tests (GREEN)
|
|
35
|
-
- Refactor (IMPROVE)
|
|
36
|
-
- Verify 80%+ coverage
|
|
37
|
-
|
|
38
|
-
3. **Code Review**
|
|
39
|
-
- Use **code-reviewer** agent immediately after writing code
|
|
40
|
-
- Address CRITICAL and HIGH issues
|
|
41
|
-
- Fix MEDIUM issues when possible
|
|
42
|
-
|
|
43
|
-
4. **Commit & Push**
|
|
44
|
-
- Detailed commit messages
|
|
45
|
-
- Follow conventional commits format
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# Hooks System
|
|
2
|
-
|
|
3
|
-
## Hook Types
|
|
4
|
-
|
|
5
|
-
- **PreToolUse**: Before tool execution (validation, parameter modification)
|
|
6
|
-
- **PostToolUse**: After tool execution (auto-format, checks)
|
|
7
|
-
- **Stop**: When session ends (final verification)
|
|
8
|
-
|
|
9
|
-
## Auto-Accept Permissions
|
|
10
|
-
|
|
11
|
-
Use with caution:
|
|
12
|
-
- Enable for trusted, well-defined plans
|
|
13
|
-
- Disable for exploratory work
|
|
14
|
-
- Never use dangerously-skip-permissions flag
|
|
15
|
-
- Configure `allowedTools` in `~/.claude.json` instead
|
|
16
|
-
|
|
17
|
-
## TodoWrite Best Practices
|
|
18
|
-
|
|
19
|
-
Use TodoWrite tool to:
|
|
20
|
-
- Track progress on multi-step tasks
|
|
21
|
-
- Verify understanding of instructions
|
|
22
|
-
- Enable real-time steering
|
|
23
|
-
- Show granular implementation steps
|
|
24
|
-
|
|
25
|
-
Todo list reveals:
|
|
26
|
-
- Out of order steps
|
|
27
|
-
- Missing items
|
|
28
|
-
- Extra unnecessary items
|
|
29
|
-
- Wrong granularity
|
|
30
|
-
- Misinterpreted requirements
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# Common Patterns
|
|
2
|
-
|
|
3
|
-
## Skeleton Projects
|
|
4
|
-
|
|
5
|
-
When implementing new functionality:
|
|
6
|
-
1. Search for battle-tested skeleton projects
|
|
7
|
-
2. Use parallel agents to evaluate options:
|
|
8
|
-
- Security assessment
|
|
9
|
-
- Extensibility analysis
|
|
10
|
-
- Relevance scoring
|
|
11
|
-
- Implementation planning
|
|
12
|
-
3. Clone best match as foundation
|
|
13
|
-
4. Iterate within proven structure
|
|
14
|
-
|
|
15
|
-
## Design Patterns
|
|
16
|
-
|
|
17
|
-
### Repository Pattern
|
|
18
|
-
|
|
19
|
-
Encapsulate data access behind a consistent interface:
|
|
20
|
-
- Define standard operations: findAll, findById, create, update, delete
|
|
21
|
-
- Concrete implementations handle storage details (database, API, file, etc.)
|
|
22
|
-
- Business logic depends on the abstract interface, not the storage mechanism
|
|
23
|
-
- Enables easy swapping of data sources and simplifies testing with mocks
|
|
24
|
-
|
|
25
|
-
### API Response Format
|
|
26
|
-
|
|
27
|
-
Use a consistent envelope for all API responses:
|
|
28
|
-
- Include a success/status indicator
|
|
29
|
-
- Include the data payload (nullable on error)
|
|
30
|
-
- Include an error message field (nullable on success)
|
|
31
|
-
- Include metadata for paginated responses (total, page, limit)
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# Performance Optimization
|
|
2
|
-
|
|
3
|
-
## Model Selection Strategy
|
|
4
|
-
|
|
5
|
-
**Haiku 4.5** (90% of Sonnet capability, 3x cost savings):
|
|
6
|
-
- Lightweight agents with frequent invocation
|
|
7
|
-
- Pair programming and code generation
|
|
8
|
-
- Worker agents in multi-agent systems
|
|
9
|
-
|
|
10
|
-
**Sonnet 4.6** (Best coding model):
|
|
11
|
-
- Main development work
|
|
12
|
-
- Orchestrating multi-agent workflows
|
|
13
|
-
- Complex coding tasks
|
|
14
|
-
|
|
15
|
-
**Opus 4.5** (Deepest reasoning):
|
|
16
|
-
- Complex architectural decisions
|
|
17
|
-
- Maximum reasoning requirements
|
|
18
|
-
- Research and analysis tasks
|
|
19
|
-
|
|
20
|
-
## Context Window Management
|
|
21
|
-
|
|
22
|
-
Avoid last 20% of context window for:
|
|
23
|
-
- Large-scale refactoring
|
|
24
|
-
- Feature implementation spanning multiple files
|
|
25
|
-
- Debugging complex interactions
|
|
26
|
-
|
|
27
|
-
Lower context sensitivity tasks:
|
|
28
|
-
- Single-file edits
|
|
29
|
-
- Independent utility creation
|
|
30
|
-
- Documentation updates
|
|
31
|
-
- Simple bug fixes
|
|
32
|
-
|
|
33
|
-
## Extended Thinking + Plan Mode
|
|
34
|
-
|
|
35
|
-
Extended thinking is enabled by default, reserving up to 31,999 tokens for internal reasoning.
|
|
36
|
-
|
|
37
|
-
Control extended thinking via:
|
|
38
|
-
- **Toggle**: Option+T (macOS) / Alt+T (Windows/Linux)
|
|
39
|
-
- **Config**: Set `alwaysThinkingEnabled` in `~/.claude/settings.json`
|
|
40
|
-
- **Budget cap**: `export MAX_THINKING_TOKENS=10000`
|
|
41
|
-
- **Verbose mode**: Ctrl+O to see thinking output
|
|
42
|
-
|
|
43
|
-
For complex tasks requiring deep reasoning:
|
|
44
|
-
1. Ensure extended thinking is enabled (on by default)
|
|
45
|
-
2. Enable **Plan Mode** for structured approach
|
|
46
|
-
3. Use multiple critique rounds for thorough analysis
|
|
47
|
-
4. Use split role sub-agents for diverse perspectives
|
|
48
|
-
|
|
49
|
-
## Build Troubleshooting
|
|
50
|
-
|
|
51
|
-
If build fails:
|
|
52
|
-
1. Use **build-error-resolver** agent
|
|
53
|
-
2. Analyze error messages
|
|
54
|
-
3. Fix incrementally
|
|
55
|
-
4. Verify after each fix
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# Security Guidelines
|
|
2
|
-
|
|
3
|
-
## Mandatory Security Checks
|
|
4
|
-
|
|
5
|
-
Before ANY commit:
|
|
6
|
-
- [ ] No hardcoded secrets (API keys, passwords, tokens)
|
|
7
|
-
- [ ] All user inputs validated
|
|
8
|
-
- [ ] SQL injection prevention (parameterized queries)
|
|
9
|
-
- [ ] XSS prevention (sanitized HTML)
|
|
10
|
-
- [ ] CSRF protection enabled
|
|
11
|
-
- [ ] Authentication/authorization verified
|
|
12
|
-
- [ ] Rate limiting on all endpoints
|
|
13
|
-
- [ ] Error messages don't leak sensitive data
|
|
14
|
-
|
|
15
|
-
## Secret Management
|
|
16
|
-
|
|
17
|
-
- NEVER hardcode secrets in source code
|
|
18
|
-
- ALWAYS use environment variables or a secret manager
|
|
19
|
-
- Validate that required secrets are present at startup
|
|
20
|
-
- Rotate any secrets that may have been exposed
|
|
21
|
-
|
|
22
|
-
## Security Response Protocol
|
|
23
|
-
|
|
24
|
-
If security issue found:
|
|
25
|
-
1. STOP immediately
|
|
26
|
-
2. Use **security-reviewer** agent
|
|
27
|
-
3. Fix CRITICAL issues before continuing
|
|
28
|
-
4. Rotate any exposed secrets
|
|
29
|
-
5. Review entire codebase for similar issues
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# Testing Requirements
|
|
2
|
-
|
|
3
|
-
## Minimum Test Coverage: 80%
|
|
4
|
-
|
|
5
|
-
Test Types (ALL required):
|
|
6
|
-
1. **Unit Tests** - Individual functions, utilities, components
|
|
7
|
-
2. **Integration Tests** - API endpoints, database operations
|
|
8
|
-
3. **E2E Tests** - Critical user flows (framework chosen per language)
|
|
9
|
-
|
|
10
|
-
## Test-Driven Development
|
|
11
|
-
|
|
12
|
-
MANDATORY workflow:
|
|
13
|
-
1. Write test first (RED)
|
|
14
|
-
2. Run test - it should FAIL
|
|
15
|
-
3. Write minimal implementation (GREEN)
|
|
16
|
-
4. Run test - it should PASS
|
|
17
|
-
5. Refactor (IMPROVE)
|
|
18
|
-
6. Verify coverage (80%+)
|
|
19
|
-
|
|
20
|
-
## Troubleshooting Test Failures
|
|
21
|
-
|
|
22
|
-
1. Use **tdd-guide** agent
|
|
23
|
-
2. Check test isolation
|
|
24
|
-
3. Verify mocks are correct
|
|
25
|
-
4. Fix implementation, not tests (unless tests are wrong)
|
|
26
|
-
|
|
27
|
-
## Agent Support
|
|
28
|
-
|
|
29
|
-
- **tdd-guide** - Use PROACTIVELY for new features, enforces write-tests-first
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
paths:
|
|
3
|
-
- "**/*.py"
|
|
4
|
-
- "**/*.pyi"
|
|
5
|
-
---
|
|
6
|
-
# Python Coding Style
|
|
7
|
-
|
|
8
|
-
> This file extends [common/coding-style.md](../common/coding-style.md) with Python specific content.
|
|
9
|
-
|
|
10
|
-
## Standards
|
|
11
|
-
|
|
12
|
-
- Follow **PEP 8** conventions
|
|
13
|
-
- Use **type annotations** on all function signatures
|
|
14
|
-
|
|
15
|
-
## Immutability
|
|
16
|
-
|
|
17
|
-
Prefer immutable data structures:
|
|
18
|
-
|
|
19
|
-
```python
|
|
20
|
-
from dataclasses import dataclass
|
|
21
|
-
|
|
22
|
-
@dataclass(frozen=True)
|
|
23
|
-
class User:
|
|
24
|
-
name: str
|
|
25
|
-
email: str
|
|
26
|
-
|
|
27
|
-
from typing import NamedTuple
|
|
28
|
-
|
|
29
|
-
class Point(NamedTuple):
|
|
30
|
-
x: float
|
|
31
|
-
y: float
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Formatting
|
|
35
|
-
|
|
36
|
-
- **black** for code formatting
|
|
37
|
-
- **isort** for import sorting
|
|
38
|
-
- **ruff** for linting
|
|
39
|
-
|
|
40
|
-
## Reference
|
|
41
|
-
|
|
42
|
-
See skill: `python-patterns` for comprehensive Python idioms and patterns.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
paths:
|
|
3
|
-
- "**/*.py"
|
|
4
|
-
- "**/*.pyi"
|
|
5
|
-
---
|
|
6
|
-
# Python Hooks
|
|
7
|
-
|
|
8
|
-
> This file extends [common/hooks.md](../common/hooks.md) with Python specific content.
|
|
9
|
-
|
|
10
|
-
## PostToolUse Hooks
|
|
11
|
-
|
|
12
|
-
Configure in `~/.claude/settings.json`:
|
|
13
|
-
|
|
14
|
-
- **black/ruff**: Auto-format `.py` files after edit
|
|
15
|
-
- **mypy/pyright**: Run type checking after editing `.py` files
|
|
16
|
-
|
|
17
|
-
## Warnings
|
|
18
|
-
|
|
19
|
-
- Warn about `print()` statements in edited files (use `logging` module instead)
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
paths:
|
|
3
|
-
- "**/*.py"
|
|
4
|
-
- "**/*.pyi"
|
|
5
|
-
---
|
|
6
|
-
# Python Patterns
|
|
7
|
-
|
|
8
|
-
> This file extends [common/patterns.md](../common/patterns.md) with Python specific content.
|
|
9
|
-
|
|
10
|
-
## Protocol (Duck Typing)
|
|
11
|
-
|
|
12
|
-
```python
|
|
13
|
-
from typing import Protocol
|
|
14
|
-
|
|
15
|
-
class Repository(Protocol):
|
|
16
|
-
def find_by_id(self, id: str) -> dict | None: ...
|
|
17
|
-
def save(self, entity: dict) -> dict: ...
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Dataclasses as DTOs
|
|
21
|
-
|
|
22
|
-
```python
|
|
23
|
-
from dataclasses import dataclass
|
|
24
|
-
|
|
25
|
-
@dataclass
|
|
26
|
-
class CreateUserRequest:
|
|
27
|
-
name: str
|
|
28
|
-
email: str
|
|
29
|
-
age: int | None = None
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Context Managers & Generators
|
|
33
|
-
|
|
34
|
-
- Use context managers (`with` statement) for resource management
|
|
35
|
-
- Use generators for lazy evaluation and memory-efficient iteration
|
|
36
|
-
|
|
37
|
-
## Reference
|
|
38
|
-
|
|
39
|
-
See skill: `python-patterns` for comprehensive patterns including decorators, concurrency, and package organization.
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
paths:
|
|
3
|
-
- "**/*.py"
|
|
4
|
-
- "**/*.pyi"
|
|
5
|
-
---
|
|
6
|
-
# Python Security
|
|
7
|
-
|
|
8
|
-
> This file extends [common/security.md](../common/security.md) with Python specific content.
|
|
9
|
-
|
|
10
|
-
## Secret Management
|
|
11
|
-
|
|
12
|
-
```python
|
|
13
|
-
import os
|
|
14
|
-
from dotenv import load_dotenv
|
|
15
|
-
|
|
16
|
-
load_dotenv()
|
|
17
|
-
|
|
18
|
-
api_key = os.environ["OPENAI_API_KEY"] # Raises KeyError if missing
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Security Scanning
|
|
22
|
-
|
|
23
|
-
- Use **bandit** for static security analysis:
|
|
24
|
-
```bash
|
|
25
|
-
bandit -r src/
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## Reference
|
|
29
|
-
|
|
30
|
-
See skill: `django-security` for Django-specific security guidelines (if applicable).
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
paths:
|
|
3
|
-
- "**/*.py"
|
|
4
|
-
- "**/*.pyi"
|
|
5
|
-
---
|
|
6
|
-
# Python Testing
|
|
7
|
-
|
|
8
|
-
> This file extends [common/testing.md](../common/testing.md) with Python specific content.
|
|
9
|
-
|
|
10
|
-
## Framework
|
|
11
|
-
|
|
12
|
-
Use **pytest** as the testing framework.
|
|
13
|
-
|
|
14
|
-
## Coverage
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
pytest --cov=src --cov-report=term-missing
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Test Organization
|
|
21
|
-
|
|
22
|
-
Use `pytest.mark` for test categorization:
|
|
23
|
-
|
|
24
|
-
```python
|
|
25
|
-
import pytest
|
|
26
|
-
|
|
27
|
-
@pytest.mark.unit
|
|
28
|
-
def test_calculate_total():
|
|
29
|
-
...
|
|
30
|
-
|
|
31
|
-
@pytest.mark.integration
|
|
32
|
-
def test_database_connection():
|
|
33
|
-
...
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Reference
|
|
37
|
-
|
|
38
|
-
See skill: `python-testing` for detailed pytest patterns and fixtures.
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
paths:
|
|
3
|
-
- "**/*.ts"
|
|
4
|
-
- "**/*.tsx"
|
|
5
|
-
- "**/*.js"
|
|
6
|
-
- "**/*.jsx"
|
|
7
|
-
---
|
|
8
|
-
# TypeScript/JavaScript Testing
|
|
9
|
-
|
|
10
|
-
> This file extends [common/testing.md](../common/testing.md) with TypeScript/JavaScript specific content.
|
|
11
|
-
|
|
12
|
-
## E2E Testing
|
|
13
|
-
|
|
14
|
-
Use **Playwright** as the E2E testing framework for critical user flows.
|
|
15
|
-
|
|
16
|
-
## Agent Support
|
|
17
|
-
|
|
18
|
-
- **e2e-runner** - Playwright E2E testing specialist
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
paths:
|
|
3
|
-
- "**/*.py"
|
|
4
|
-
- "**/*.pyi"
|
|
5
|
-
---
|
|
6
|
-
# Python Hooks
|
|
7
|
-
|
|
8
|
-
> This file extends [common/hooks.md](../common/hooks.md) with Python specific content.
|
|
9
|
-
|
|
10
|
-
## PostToolUse Hooks
|
|
11
|
-
|
|
12
|
-
Configure in `~/.claude/settings.json`:
|
|
13
|
-
|
|
14
|
-
- **black/ruff**: Auto-format `.py` files after edit
|
|
15
|
-
- **mypy/pyright**: Run type checking after editing `.py` files
|
|
16
|
-
|
|
17
|
-
## Warnings
|
|
18
|
-
|
|
19
|
-
- Warn about `print()` statements in edited files (use `logging` module instead)
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
paths:
|
|
3
|
-
- "**/*.py"
|
|
4
|
-
- "**/*.pyi"
|
|
5
|
-
---
|
|
6
|
-
# Python Patterns
|
|
7
|
-
|
|
8
|
-
> This file extends [common/patterns.md](../common/patterns.md) with Python specific content.
|
|
9
|
-
|
|
10
|
-
## Protocol (Duck Typing)
|
|
11
|
-
|
|
12
|
-
```python
|
|
13
|
-
from typing import Protocol
|
|
14
|
-
|
|
15
|
-
class Repository(Protocol):
|
|
16
|
-
def find_by_id(self, id: str) -> dict | None: ...
|
|
17
|
-
def save(self, entity: dict) -> dict: ...
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Dataclasses as DTOs
|
|
21
|
-
|
|
22
|
-
```python
|
|
23
|
-
from dataclasses import dataclass
|
|
24
|
-
|
|
25
|
-
@dataclass
|
|
26
|
-
class CreateUserRequest:
|
|
27
|
-
name: str
|
|
28
|
-
email: str
|
|
29
|
-
age: int | None = None
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Context Managers & Generators
|
|
33
|
-
|
|
34
|
-
- Use context managers (`with` statement) for resource management
|
|
35
|
-
- Use generators for lazy evaluation and memory-efficient iteration
|
|
36
|
-
|
|
37
|
-
## Reference
|
|
38
|
-
|
|
39
|
-
See skill: `python-patterns` for comprehensive patterns including decorators, concurrency, and package organization.
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
paths:
|
|
3
|
-
- "**/*.py"
|
|
4
|
-
- "**/*.pyi"
|
|
5
|
-
---
|
|
6
|
-
# Python Security
|
|
7
|
-
|
|
8
|
-
> This file extends [common/security.md](../common/security.md) with Python specific content.
|
|
9
|
-
|
|
10
|
-
## Secret Management
|
|
11
|
-
|
|
12
|
-
```python
|
|
13
|
-
import os
|
|
14
|
-
from dotenv import load_dotenv
|
|
15
|
-
|
|
16
|
-
load_dotenv()
|
|
17
|
-
|
|
18
|
-
api_key = os.environ["OPENAI_API_KEY"] # Raises KeyError if missing
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Security Scanning
|
|
22
|
-
|
|
23
|
-
- Use **bandit** for static security analysis:
|
|
24
|
-
```bash
|
|
25
|
-
bandit -r src/
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## Reference
|
|
29
|
-
|
|
30
|
-
See skill: `django-security` for Django-specific security guidelines (if applicable).
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
paths:
|
|
3
|
-
- "**/*.py"
|
|
4
|
-
- "**/*.pyi"
|
|
5
|
-
---
|
|
6
|
-
# Python Testing
|
|
7
|
-
|
|
8
|
-
> This file extends [common/testing.md](../common/testing.md) with Python specific content.
|
|
9
|
-
|
|
10
|
-
## Framework
|
|
11
|
-
|
|
12
|
-
Use **pytest** as the testing framework.
|
|
13
|
-
|
|
14
|
-
## Coverage
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
pytest --cov=src --cov-report=term-missing
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Test Organization
|
|
21
|
-
|
|
22
|
-
Use `pytest.mark` for test categorization:
|
|
23
|
-
|
|
24
|
-
```python
|
|
25
|
-
import pytest
|
|
26
|
-
|
|
27
|
-
@pytest.mark.unit
|
|
28
|
-
def test_calculate_total():
|
|
29
|
-
...
|
|
30
|
-
|
|
31
|
-
@pytest.mark.integration
|
|
32
|
-
def test_database_connection():
|
|
33
|
-
...
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Reference
|
|
37
|
-
|
|
38
|
-
See skill: `python-testing` for detailed pytest patterns and fixtures.
|