Skip to content
cccskills
FreePublished on GitHub

cc-core-defensive

Use these cross-language guidelines when changing existing code, configuration, or scripts. They encourage small, evidence-based fixes, handling real input boundaries, and targeted verification while avoiding unnecessary fallback logic or abstractions for hypothetical risks.

OriginalShow the original description

通用防御性编码规范,适用于跨语言代码修改中的最小改动、真实边界处理、定向验证,以及约束假想风险驱动的过度兜底或抽象;不负责语言细节、正式 review 或结构化 debug。

doccker/cc-use-exp1,064 stars(GitHub 1,064 + cccskills 0)

Run score Not tested

See how to install

Good for

  • Making a focused change to existing code
  • Handling a real input or error boundary
  • Choosing a suitable scope for verification

Files included (5)

  • SKILL.md1.4 KB
  • agents/openai.yaml194 B
  • references/change-boundary.md361 B
  • references/decision-principles.md407 B
  • references/verification.md292 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

CC Core Defensive

在修改现有代码、配置或脚本时,优先使用本技能控制改动范围、决策方式和验证深度。

不要用于:

  • 语言或框架细节
  • 正式 code review 工作流
  • 结构化 debug 工作流
  • 生产环境或系统级操作安全

核心规则

  • 优先做最小有效改动。
  • 优先复用现有模式,再考虑新抽象。
  • 根因清楚时修根因;根因不清楚时先继续收集证据。
  • 不修改测试去适配错误实现。
  • 缺失真实边界上的必要校验和错误处理、明显回归都算真实问题。
  • 不要为了假想风险增加吞错逻辑、额外包装层或无需求的容灾状态。
  • 改动后做受影响范围内最小但有意义的验证。

工作方式

  1. 先读相关代码路径,再决定怎么改。
  2. 明确当前问题边界和直接影响面。
  3. 做最小改动。
  4. 做定向验证。
  5. 若必须扩大范围,先明确说明原因。

按需展开

  • 边界判断:references/change-boundary.md
  • 验证深度:references/verification.md
  • 决策原则:references/decision-principles.md

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Use this skill when designing REST API responses or handling returned values. It helps keep business data, user messages, empty values, and status codes consistent, reducing mismatches between server responses and frontend expectations.

  • Designing a REST API response structure
  • Checking whether message and data fields are used consistently
  • Choosing consistent responses for missing or empty data
doccker/cc-use-exp1.1KUpdated Aug 26, 2026

Review REST API response structures, status handling, null conventions, and business errors. For exports and downstream deliveries, check required fields before generating files or sending data, so missing values produce clear errors instead of apparently successful but unusable output.

  • Reviewing API response fields and status codes
  • Checking null and empty-list conventions
  • Validating required data before file exports
doccker/cc-use-exp1.1KUpdated Aug 26, 2026

api-proxy-safety

FreeSummary

Use this skill when implementing safety checks in gateway, proxy, WAF, or CDN middleware. It explains how to combine HTTP status and response structure with strong and weak keyword signals, reducing false error detections in long user content.

  • Reviewing proxy response error detection
  • Handling Cloudflare or gateway terms in long text
  • Designing keyword matching for middleware
doccker/cc-use-exp1.1KUpdated Aug 26, 2026

Design long-running API or data tasks as asynchronous jobs that return promptly and expose their status. The guidance covers duplicate triggers, expiring stored state, carrying request context into worker threads, and frontend progress polling so users can track completion.

  • Turning a slow API operation into a background task
  • Preventing repeated clicks from starting duplicate jobs
  • Adding task status and progress polling
doccker/cc-use-exp1.1KUpdated Aug 26, 2026

bash-style

FreeSummary

Use this skill to write and maintain Bash commands in shell scripts, Dockerfiles, Makefiles, YAML files, and Markdown examples. It sets practical conventions for comments, variables, heredocs, file writing, paths, and safer command patterns.

  • Writing or editing a Bash script
  • Adding shell commands to a Dockerfile or Makefile
  • Documenting Bash commands in Markdown
doccker/cc-use-exp1.1KUpdated Aug 26, 2026

bash-style

FreeSummary

Apply consistent conventions to Bash scripts and system commands, including quoted variables, explicit paths, safe file writing, and logging for complex commands. The guidance helps keep scripts easier to follow and maintain.

  • Set conventions for a Bash script
  • Review shell commands for safer path and variable handling
  • Add logging to a complex command
doccker/cc-use-exp1.1KUpdated Aug 26, 2026

See all skills by doccker

Report a problem with this skill