@juho0719/cckit 0.1.1
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/assets/agents/architect.md +211 -0
- package/assets/agents/build-error-resolver.md +114 -0
- package/assets/agents/ccwin-code-reviewer.md +224 -0
- package/assets/agents/database-reviewer.md +91 -0
- package/assets/agents/doc-updater.md +107 -0
- package/assets/agents/e2e-runner.md +107 -0
- package/assets/agents/planner.md +212 -0
- package/assets/agents/python-reviewer.md +98 -0
- package/assets/agents/refactor-cleaner.md +85 -0
- package/assets/agents/security-reviewer.md +108 -0
- package/assets/agents/superpower-code-reviewer.md +48 -0
- package/assets/agents/tdd-guide.md +80 -0
- package/assets/commands/build-fix.md +62 -0
- package/assets/commands/checkpoint.md +74 -0
- package/assets/commands/code-review.md +40 -0
- package/assets/commands/e2e.md +362 -0
- package/assets/commands/eval.md +120 -0
- package/assets/commands/orchestrate.md +172 -0
- package/assets/commands/plan.md +113 -0
- package/assets/commands/python-review.md +297 -0
- package/assets/commands/refactor-clean.md +80 -0
- package/assets/commands/sessions.md +305 -0
- package/assets/commands/tdd.md +326 -0
- package/assets/commands/test-coverage.md +69 -0
- package/assets/commands/update-codemaps.md +72 -0
- package/assets/commands/update-docs.md +84 -0
- package/assets/commands/verify.md +59 -0
- package/assets/hooks/post-edit-format.js +49 -0
- package/assets/hooks/post-edit-typecheck.js +96 -0
- package/assets/mcps/mcp-servers.json +92 -0
- package/assets/rules/common/agents.md +49 -0
- package/assets/rules/common/coding-style.md +48 -0
- package/assets/rules/common/git-workflow.md +45 -0
- package/assets/rules/common/hooks.md +30 -0
- package/assets/rules/common/patterns.md +31 -0
- package/assets/rules/common/performance.md +55 -0
- package/assets/rules/common/security.md +29 -0
- package/assets/rules/common/testing.md +29 -0
- package/assets/rules/python/coding-style.md +42 -0
- package/assets/rules/python/hooks.md +19 -0
- package/assets/rules/python/patterns.md +39 -0
- package/assets/rules/python/security.md +30 -0
- package/assets/rules/python/testing.md +38 -0
- package/assets/rules/typescript/coding-style.md +18 -0
- package/assets/rules/typescript/hooks.md +19 -0
- package/assets/rules/typescript/patterns.md +39 -0
- package/assets/rules/typescript/security.md +30 -0
- package/assets/rules/typescript/testing.md +38 -0
- package/assets/skills/api-design/SKILL.md +522 -0
- package/assets/skills/backend-patterns/SKILL.md +597 -0
- package/assets/skills/brainstorming/SKILL.md +96 -0
- package/assets/skills/coding-standards/SKILL.md +529 -0
- package/assets/skills/database-migrations/SKILL.md +334 -0
- package/assets/skills/deployment-patterns/SKILL.md +426 -0
- package/assets/skills/dispatching-parallel-agents/SKILL.md +180 -0
- package/assets/skills/docker-patterns/SKILL.md +363 -0
- package/assets/skills/e2e-testing/SKILL.md +325 -0
- package/assets/skills/eval-harness/SKILL.md +235 -0
- package/assets/skills/executing-plans/SKILL.md +84 -0
- package/assets/skills/finishing-a-development-branch/SKILL.md +200 -0
- package/assets/skills/frontend-patterns/SKILL.md +641 -0
- package/assets/skills/iterative-retrieval/SKILL.md +210 -0
- package/assets/skills/postgres-patterns/SKILL.md +145 -0
- package/assets/skills/python-patterns/SKILL.md +749 -0
- package/assets/skills/python-testing/SKILL.md +815 -0
- package/assets/skills/receiving-code-review/SKILL.md +213 -0
- package/assets/skills/requesting-code-review/SKILL.md +105 -0
- package/assets/skills/requesting-code-review/code-reviewer-template.md +146 -0
- package/assets/skills/subagent-driven-development/SKILL.md +242 -0
- package/assets/skills/subagent-driven-development/code-quality-reviewer-prompt.md +20 -0
- package/assets/skills/subagent-driven-development/implementer-prompt.md +78 -0
- package/assets/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/assets/skills/systematic-debugging/CREATION-LOG.md +114 -0
- package/assets/skills/systematic-debugging/SKILL.md +296 -0
- package/assets/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/assets/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/assets/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/assets/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/assets/skills/systematic-debugging/scripts/find-polluter.sh +63 -0
- package/assets/skills/systematic-debugging/test-academic.md +14 -0
- package/assets/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/assets/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/assets/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/assets/skills/tdd-workflow/SKILL.md +409 -0
- package/assets/skills/test-driven-development/SKILL.md +371 -0
- package/assets/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/assets/skills/using-git-worktrees/SKILL.md +218 -0
- package/assets/skills/verification-before-completion/SKILL.md +139 -0
- package/assets/skills/verification-loop/SKILL.md +125 -0
- package/assets/skills/writing-plans/SKILL.md +116 -0
- package/dist/agents-AEKT67A6.js +9 -0
- package/dist/chunk-3GUKEMND.js +28 -0
- package/dist/chunk-3UNN3IBE.js +54 -0
- package/dist/chunk-3Y26YU4R.js +27 -0
- package/dist/chunk-5XOKKPAA.js +21 -0
- package/dist/chunk-6B46AIFM.js +136 -0
- package/dist/chunk-EYY2IZ7N.js +27 -0
- package/dist/chunk-K25UZZVG.js +17 -0
- package/dist/chunk-KEENFBLL.js +24 -0
- package/dist/chunk-RMUKD7CW.js +44 -0
- package/dist/chunk-W63UKEIT.js +50 -0
- package/dist/cli-VZRGF733.js +238 -0
- package/dist/commands-P5LILVZ5.js +9 -0
- package/dist/hooks-IIG2XK4I.js +9 -0
- package/dist/index.js +131 -0
- package/dist/mcps-67Q7TBGW.js +6 -0
- package/dist/paths-FT6KBIRD.js +10 -0
- package/dist/registry-EGXWYWWK.js +17 -0
- package/dist/rules-2CPBVNNJ.js +7 -0
- package/dist/skills-ULMW3UCM.js +8 -0
- package/package.json +36 -0
|
@@ -0,0 +1,55 @@
|
|
|
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
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
|
@@ -0,0 +1,42 @@
|
|
|
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.
|
|
@@ -0,0 +1,19 @@
|
|
|
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)
|
|
@@ -0,0 +1,39 @@
|
|
|
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.
|
|
@@ -0,0 +1,30 @@
|
|
|
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).
|
|
@@ -0,0 +1,38 @@
|
|
|
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.
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
|
@@ -0,0 +1,19 @@
|
|
|
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)
|
|
@@ -0,0 +1,39 @@
|
|
|
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.
|
|
@@ -0,0 +1,30 @@
|
|
|
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).
|
|
@@ -0,0 +1,38 @@
|
|
|
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.
|