impl-standards — скилл для Claude Code: стандарты кода и как установить
Скилл impl-standards для Claude Code задаёт правила обработки ошибок, работы с константами, логирования прогресса и DI. Запускается при упоминании этих тем.
MIT 126 установок ★ 3 обновлён 2026-10-25
npx skills add terrylica/cc-skills --skill impl-standards -a claude-codeЧто делает impl-standards
Скилл запускается при упоминании error handling, constants, magic numbers, progress logging, SSoT или dependency injection. Даёт таблицу правил: ошибки поднимать и пробрасывать без fallback, магические числа выносить в семантические константы, операции длиннее минуты логировать каждые 15–60 секунд. Для конфига советует паттерн singleton с None-дефолтом и цепочкой резолверов, валидацией в точке входа. Логи пишет в logs/{adr-id}-YYYYMMDD_HHMMSS.log.
Внутри — примеры на Python, ссылки на три референса (error handling, constants management, SSoT/DI) и таблица траблшутинга: что делать с silent failures, magic numbers и type errors. Для ML-пайплайнов рекомендует Polars вместо Pandas, кроме случаев, когда нужен MLflow. Доступны команды чтения (Read, Grep, Glob). Без FFmpeg, ключей API и внешних зависимостей работать не будет — проверь allowed-tools.
Какие задачи решает
- Вынести магические числа в именованные константы
- Добавить логирование прогресса в долгую операцию
- Поднять и пробросить ошибку вместо молчаливого catch
- Перейти с Pandas на Polars в новом пайплайне
- Проверить код на hardcoded значения перед релизом
Примеры запросов агенту
- Покажи, как правильно обработать ошибку запроса по стандартам
impl-standards - Вынеси timeout 30 в константу по правилам скилла
- Добавь логирование прогресса каждые 30 секунд в цикл обработки
Как установить impl-standards
1Через Skills CLI (Vercel)
npx skills add terrylica/cc-skills --skill impl-standards -a claude-code2Вручную: положить файлы
~/.claude/skills/impl-standards/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/impl-standards/
1Через Skills CLI (Vercel)
npx skills add terrylica/cc-skills --skill impl-standards -a codex2Вручную: положить файлы
.agents/skills/impl-standards/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add terrylica/cc-skills --skill impl-standards -a cursor2Вручную: положить файлы
.cursor/skills/impl-standards/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install terrylica/cc-skills plugins/itp/skills/impl-standards2Вручную: положить файлы
.github/skills/impl-standards/SKILL.md1Через Skills CLI (Vercel)
npx skills add terrylica/cc-skills --skill impl-standards -a gemini-cli2Командой платформы
gemini skills install https://github.com/terrylica/cc-skills --path plugins/itp/skills/impl-standardsВручную: положить файлы
.devin/skills/impl-standards/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add terrylica/cc-skills --skill impl-standards -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы об impl-standards
Как установить impl-standards в Claude Code?
Выполни npx skills add terrylica/cc-skills --skill impl-standards -a claude-code, скилл появится в ~/.claude/skills/impl-standards/SKILL.md.
Что делает impl-standards?
Даёт правила для обработки ошибок (raise + propagate), констант (выносить магические числа), логирования прогресса (каждые 15–60 секунд в операциях длиннее минуты), конфига (singleton с None-дефолтом) и выбора библиотек (Polars вместо Pandas).
Когда скилл срабатывает?
При упоминании error handling, constants, magic numbers, progress logging, SSoT, dependency injection, config singleton или перед релизом для проверки качества кода.
Исходный текст
SKILL.md · MIT
---
name: impl-standards
description: Core engineering standards for implementation. TRIGGERS - error handling, constants management, progress logging, code quality.
allowed-tools: Read, Grep, Glob
---
# Implementation Standards
Apply these standards during implementation to ensure consistent, maintainable code.
> **Self-Evolving Skill**: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.
## When to Use This Skill
- During `/itp:go` Phase 1
- When writing new production code
- User mentions "error handling", "constants", "magic numbers", "progress logging", "SSoT", "dependency injection", "config singleton"
- Before release to verify code quality
## Quick Reference
| Standard | Rule |
| ---------------- | ------------------------------------------------------------------------ |
| **Errors** | Raise + propagate; no fallback/default/retry/silent |
| **Constants** | Abstract magic numbers into semantic, version-agnostic dynamic constants |
| **SSoT/DI** | Config singleton → None-default + resolver → entry-point validation |
| **Dependencies** | Prefer OSS libs over custom code; no backward-compatibility needed |
| **Progress** | Operations >1min: log status every 15-60s |
| **Logs** | `logs/{adr-id}-YYYYMMDD_HHMMSS.log` (nohup) |
| **Metadata** | Optional: `catalog-info.yaml` for service discovery |
---
## Error Handling
**Core Rule**: Raise + propagate; no fallback/default/retry/silent
```python
# ✅ Correct - raise with context
def fetch_data(url: str) -> dict:
response = requests.get(url)
if response.status_code != 200:
raise APIError(f"Failed to fetch {url}: {response.status_code}")
return response.json()
# ❌ Wrong - silent catch
try:
result = fetch_data()
except Exception:
pass # Error hidden
```
See [Error Handling Reference](./references/error-handling.md) for detailed patterns.
---
## Constants Management
**Core Rule**: Abstract magic numbers into semantic constants
```python
# ✅ Correct - named constant
DEFAULT_API_TIMEOUT_SECONDS = 30
response = requests.get(url, timeout=DEFAULT_API_TIMEOUT_SECONDS)
# ❌ Wrong - magic number
response = requests.get(url, timeout=30)
```
See [Constants Management Reference](./references/constants-management.md) for patterns.
---
## Progress Logging
For operations taking more than 1 minute, log status every 15-60 seconds:
```python
import logging
from datetime import datetime
logger = logging.getLogger(__name__)
def long_operation(items: list) -> None:
total = len(items)
last_log = datetime.now()
for i, item in enumerate(items):
process(item)
# Log every 30 seconds
if (datetime.now() - last_log).seconds >= 30:
logger.info(f"Progress: {i+1}/{total} ({100*(i+1)//total}%)")
last_log = datetime.now()
logger.info(f"Completed: {total} items processed")
```
---
## Log File Convention
Save logs to: `logs/{adr-id}-YYYYMMDD_HHMMSS.log`
```bash
# Running with nohup
nohup python script.py > logs/2025-12-01-my-feature-20251201_143022.log 2>&1 &
```
---
---
## Data Processing
**Core Rule**: Prefer Polars over Pandas for dataframe operations.
| Scenario | Recommendation |
| ------------------ | ---------------------------------- |
| New data pipelines | Use Polars (30x faster, lazy eval) |
| ML feature eng | Polars → Arrow → NumPy (zero-copy) |
| MLflow logging | Pandas OK (add exception comment) |
| Legacy code fixes | Keep existing library |
**Exception mechanism**: Add at file top:
```python
# polars-exception: MLflow requires Pandas DataFrames
import pandas as pd
```
See [ml-data-pipeline-architecture](/plugins/devops-tools/skills/ml-data-pipeline-architecture/SKILL.md) for decision tree and benchmarks.
---
## Related Skills
| Skill | Purpose |
| ------------------------------------------------------------------------------------------------------ | -------------------------------------- |
| [`adr-code-traceability`](../adr-code-traceability/SKILL.md) | Add ADR references to code |
| [`code-hardcode-audit`](../code-hardcode-audit/SKILL.md) | Detect hardcoded values before release |
| [`ml-data-pipeline-architecture`](/plugins/devops-tools/skills/ml-data-pipeline-architecture/SKILL.md) | Polars/Arrow efficiency patterns |
---
## Reference Documentation
- [Error Handling](./references/error-handling.md) - Raise + propagate patterns
- [Constants Management](./references/constants-management.md) - Magic number abstraction
- [SSoT / Dependency Injection](./references/ssot-dependency-injection.md) - Config singleton → None-default → resolver chain
---
## Troubleshooting
| Issue | Cause | Solution |
| ---------------------- | -------------------- | ------------------------------------------ |
| Silent failures | Bare except blocks | Catch specific exceptions, log or re-raise |
| Magic numbers in code | Missing constants | Extract to named constants with context |
| Error swallowed | except: pass pattern | Log error before continuing or re-raise |
| Type errors at runtime | Missing validation | Add input validation at boundaries |
| Config not loading | Hardcoded paths | Use environment variables with defaults |
## Post-Execution Reflection
After this skill completes, check before closing:
1. **Did the command succeed?** — If not, fix the instruction or error table that caused the failure.
2. **Did parameters or output change?** — If the underlying tool's interface drifted, update Usage examples and Parameters table to match.
3. **Was a workaround needed?** — If you had to improvise (different flags, extra steps), update this SKILL.md so the next invocation doesn't need the same workaround.
Only update if the issue is real and reproducible — not speculative.
© terrylica · MIT · terrylica/cc-skills