跳到正文
Skillpedia
通用编程6.0k · #14483

daily-coding

它能做什么

这项技能是一份简短的清单,让日常代码修改更加谨慎和整洁。适合请 AI 在项目中编写、添加或修改代码的任何人。

适用场景

  • ✓当你请 AI 在项目中编写、添加或修改代码时。
  • ✓当你希望做小而安全的改动,不添加额外功能或无关修改时。
  • ✓当你希望 AI 检查代码能否运行,并在最后清理调试输出的时候。

技能链接

https://github.com/Galaxy-Dawn/claude-scholar/blob/main/skills/daily-coding/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/Galaxy-Dawn/claude-scholar/blob/main/skills/daily-coding/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请在我的 utils 文件中添加一个格式化日期的函数,并保持改动小一些。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会先读取文件再编辑,只修改必要的部分,检查安全和类型问题,能运行时就运行代码,最后总结改动内容。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Daily Coding Checklist

A minimal coding quality assurance checklist ensuring every code modification follows best practices.

When to Use

Use this skill for:

  • Implementing new features
  • Adding code or modifying existing code
  • User requests like "write a...", "implement...", "add...", or "modify..."
  • Any coding task that involves Edit or Write tools

When Not to Use

Do not use this skill for:

  • Pure reading or understanding tasks with no modification intent
  • Work already covered by specialized skills such as bug-detective, architecture-design, or verification-loop
  • Configuration-only changes
  • Documentation-only writing

Core Checklist

Before Starting

  • Read before modify - Must read target file with Read tool before making changes
  • Understand context - Confirm understanding of existing code logic and design intent

During Coding

  • Minimal changes - Only change what's necessary, no over-engineering, no unrelated features
  • Type safety - Add type hints for Python, avoid any in TypeScript
  • Security check - Avoid command injection, XSS, SQL injection vulnerabilities

After Completion

  • Verify execution - Ensure code runs correctly with no syntax errors
  • Clean up - Remove print/console.log debug statements and temporary files
  • Brief summary - Inform user what was changed and the scope of impact

Quick Reference

Common Mistakes to Avoid

# ❌ Don't
def process(data=[]):  # Mutable default argument
    pass

# ✅ Should
def process(data: list | None = None):
    data = data or []
# ❌ Don't
except:  # Bare except
    pass

# ✅ Should
except ValueError as e:
    logger.error(f"Processing failed: {e}")
    raise

Security Check Points

  • User input must be validated/escaped
  • Use pathlib for file paths, avoid path traversal
  • Never hardcode sensitive info (API keys, passwords)
常见问题

它适用于文档或配置的改动吗?

不适用。它只针对源代码改动,不适用于纯文档或纯配置的工作。

它会添加额外功能吗?

不会。清单要求做最小化改动,不加入无关功能。

它会留下调试输出吗?

不会。它要求在最后删除所有 print 和 console 调试语句。

详情

作者的原始描述

Use for everyday coding tasks that involve writing or modifying source code.

repo: Galaxy-Dawn/claude-scholar

热度

GitHub 星标
6.0k
排名
#14483
许可证
MIT
更新时间
2026/10/19

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能