AgentSkillsCN

leetcode-acers-blogger

利用 docs/leetcode_std.md 模板,结合 `date` 中的当前时间戳,为本项目中的 LeetCode 风格题目撰写 Hugo 博客文章。当用户提交题目需求并希望发布一篇新的 ACERS 博文时,即可启用此功能。

SKILL.md
--- frontmatter
name: leetcode-acers-blogger
description: Create Hugo blog posts for LeetCode-style problems in this project using docs/leetcode_std.md, with current timestamps from `date`. Use when the user provides a problem statement and wants a new ACERS post.

LeetCode ACERS Hugo Blogger

Workflow

  1. Read docs/leetcode_std.md and follow the ACERS template plus all extra requirements.
  2. Gather inputs: problem statement, examples, target language (zh/en), target folder override (if any), desired slug/title, tags/keywords.
  3. Choose output path:
    • Chinese default: content/zh/alg/leetcode/<slug>.md
    • English default: content/en/alg/leetcode/<slug>.md
    • Do not default to content/posts/leetcode.
    • If the user specifies a path (e.g., @content/posts/leetcode), honor that path.
  4. Generate front matter in YAML with title, date, draft=false, categories, tags, description, keywords.
  5. Get the current timestamp by running date "+%Y-%m-%dT%H:%M:%S%:z" and use it in date.
  6. Write the full article in Chinese technical style, including:
    • Title, subtitle/summary, target readers, background/motivation, core concepts
    • Thought-process derivation: from naive/brute force to bottleneck, key observation, method choice, and why it is correct
    • ACERS sections (Algorithm, Concepts, Engineering, Reflection, Summary)
    • Practical steps, runnable examples, explanations, FAQs, best practices
    • Meta info (reading time, tags, SEO keywords, meta description) and CTA
  7. If it is an algorithm problem, append multi-language implementations (Python, C, C++, Go, Rust, JS).
  8. Use ASCII kebab-case file names by default; avoid non-ASCII unless explicitly requested.

Required Inputs

  • Problem statement (full text or link with pasted text)
  • 1-2 examples (input/output or scenario)
  • Target language (zh or en)
  • Output folder (optional; default is the language section under content/zh/alg/leetcode)
  • Title/keywords/tags (optional; infer if not provided)

Output Format

  • Path: <file path>
  • Date: <timestamp used>
  • Notes: <assumptions or missing info>

Guardrails

  • Do not invent constraints, inputs, or outputs; ask if missing.
  • Follow docs/leetcode_std.md exactly; do not omit required sections.
  • Use runnable code, no pseudocode.
  • Keep front matter consistent with existing LeetCode posts.
  • Do not present only the final solution; include the reasoning path and key decisions.
  • Do not include secrets or private data.