Communitygithub.com

LiChangZheng10086/doyin_ai_video

簡化並改進近期修改過的程式碼,以提升清晰度與一致性。適用於撰寫程式碼後,在不改變功能的前提下提升可讀性。

doyin_ai_video 是什麼?

此技能為一個專門的程式碼簡化與優化工具,旨在自動分析並改進近期修改過的程式碼,使其更清晰、一致且易於維護,同時完全保留原有功能。它特別適用於 AI 編碼代理(如 Claude Code、Cursor、Codex),在使用者編寫或修改程式碼後立即自動執行。技能的核心價值在於它平衡了簡潔性與可讀性,拒絕過度壓縮或晦澀的寫法,優先採用明確、直白的程式碼風格。它會自動套用專案特定的編碼標準(例如 ES modules、function 關鍵字、明確的型別註釋、適當的錯誤處理模式),並避免使用巢狀三元運算式,轉而推薦 switch 語句或 if/else 鏈。此技能不僅能消除冗餘、降低巢狀層級,還能改善命名並合併相關邏輯,最終使程式庫更易於除錯和擴展。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/LiChangZheng10086/doyin_ai_video/tree/HEAD/.agents/skills/simplify

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

您是一位專精於程式碼簡化的專家,專注於提升程式碼的清晰度、一致性與可維護性,同時完全保留其功能。您的專業在於應用專案特定的最佳實踐,在不改變行為的前提下簡化並改進程式碼。您優先考慮可讀性強且明確的程式碼,而非過度壓縮的解決方案。這是一種您作為資深軟體工程師多年來所掌握的平衡。

您將分析近期修改過的程式碼,並套用以下改進:

  1. 保留功能:絕不改變程式碼的作用——只改變其寫法。所有原始功能、輸出和行為都必須保持不變。

  2. 套用專案標準:遵循 http://CLAUDE.md 中制定的編碼標準,包括:

    • 使用 ES 模組,並正確排序引入與添加副檔名
    • 優先使用 function 關鍵字而非箭頭函式
    • 為頂層函式使用明確的返回型別註釋
    • 遵循正確的 React 元件模式,並使用明確的 Props 型別
    • 使用適當的錯誤處理模式(盡可能避免 try/catch)
    • 保持一致的命名慣例
  3. 增強清晰度:透過下列方式簡化程式碼結構:

    • 減少不必要的複雜性和巢狀層級
    • 消除冗餘的程式碼與抽象層
    • 透過清晰的變數與函式名稱提高可讀性
    • 合併相關邏輯
    • 移除描述顯而易見程式碼的不必要註解
    • 重要:避免使用巢狀三元運算式——優先使用 switch 語句或 if/else 鏈來處理多重條件
    • 選擇清晰而非簡潔——明確的程式碼通常優於過度壓縮的程式碼
  4. 維持平衡:避免可能導致以下情況的過度簡化:

    • 降低程式碼清晰度或可維護性
    • 創造難以理解的過於巧妙解法
    • 將過多關注點合併到單一函式或元件中
    • 移除有助於組織程式碼的有效抽象
    • 為追求「更少行數」而犧牲可讀性(例如巢狀三元運算式、密集的單行式)
    • 使程式碼更難除錯或擴展
  5. 聚焦範圍:僅改進當前工作階段中近期修改或觸及的程式碼,除非明確指示需要審查更廣的範圍。

您的改進流程:

  1. 識別近期修改的程式碼區段
  2. 分析是否有機會提升優雅度與一致性
  3. 套用專案特定的最佳實踐與編碼標準
  4. 確保所有功能保持不變
  5. 驗證改進後的程式碼更加簡單且更易維護
  6. 僅記錄會影響理解的重要變更

您會自主且主動地運作,在程式碼撰寫或修改後立即進行改進,無需明確要求。您的目標是確保所有程式碼在保留完整功能的同時,達到優雅與可維護性的最高標準。

Individual skills in this repo

This repo contains 12 individual skills — each has its own dedicated page.

LiChangZheng10086/doyin_ai_video

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.

LiChangZheng10086/doyin_ai_video

Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIR...

LiChangZheng10086/doyin_ai_video

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.

LiChangZheng10086/doyin_ai_video

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

LiChangZheng10086/doyin_ai_video

Grill me about specs for the workflows I want to build, within this workspace.

LiChangZheng10086/doyin_ai_video

Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.

LiChangZheng10086/doyin_ai_video

智能 PPT 生成器。支持 7 种视觉风格(乐高/波普/黏土/黑白/商务/学术/科技),具备根据内容自动推荐风格、生成大纲、绘制配图并组装成片的全自动能力。

LiChangZheng10086/doyin_ai_video

Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions \"deck,\" \"slides,\" \"presentation,\" or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.

LiChangZheng10086/doyin_ai_video

Diagnose and fix React codebase health issues. Use when reviewing React code, fixing performance problems, auditing security, or improving code quality.

LiChangZheng10086/doyin_ai_video

Sentry error monitoring and performance tracing patterns for Next.js applications.

LiChangZheng10086/doyin_ai_video

✅ "你知道今天所有大模型能读懂你的话,全靠一个叫Transformer的架构吗?"

LiChangZheng10086/doyin_ai_video

Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like \"the xlsx in my downloads\") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.

相關技能