# Altair Code Header

> Use when creating or editing Python or C++ code for Altair.Zheng and a standard header comment with meaningful description and run guidance should be added before new files or substantial newly added code blocks.

- Skill: `xiangxingz/altair-code-header` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add xiangxingz/altair-code-header`
- Raw SKILL.md: https://api.skillmd.com/api/skills/xiangxingz/altair-code-header/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: XiangxingZ (https://skillmd.com/u/xiangxingz)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/xiangxingz/altair-code-header

---


# Altair Code Header

When creating or editing Python or C++ code for Altair.Zheng, add a standard header comment before the code you introduce.

Apply these rules:

- For a new Python or C++ source file, add the header at the top of the file.
- For a substantial newly added top-level function, class, or standalone code block in an existing file, add the header immediately above that block when no equivalent header already exists nearby.
- If an equivalent header already exists for the file or block, do not add a second header block. Update the existing header instead.
- Do not add this header for tiny one-line edits inside an existing documented block unless the user explicitly asks for it everywhere.
- Use the current local datetime at edit time in `YYYY/MM/DD HH:mm:ss`.
- Always set `@Author` to `Altair.Zheng`.
- Default `@version` to `1.0` unless the user asks for another value.
- `@Description` must describe the purpose of the new file or newly introduced code block. For edits in an existing file, summarize the newly added or materially changed behavior instead of leaving it blank.
- Write `@Description` in Chinese whenever the context allows. Only use English when the surrounding codebase, user request, or project convention clearly requires English.
- On the first creation, use `@Description` for the initial purpose summary.
- On the second and later modifications of the same file or code block, update `@Date` to the current edit time and append a new Chinese history line directly below the existing description lines.
- Use `@Description1` for the first later modification, `@Description2` for the next one, and continue incrementing in order without renumbering existing entries.
- Each appended `@DescriptionN` line should describe only that specific modification, not repeat the original file purpose.
- `@Comments` should contain the most relevant run, build, or test command for that file or block when it can be inferred safely from the file type or nearby project context.
- If an exact command cannot be inferred safely, write a short guidance note in `@Comments` instead of fabricating a command.
- Preserve the exact field alignment shown below.
- When both a project rule and this skill apply, emit only one header comment block.

Use these templates.

For Python:

```python
'''
@Date          : 2025/12/06 16:42:18
@Author        : Altair.Zheng
@version       : 1.0
@Description   : 用中文简要说明这段文件或代码块的作用。
@Description1  : 用中文说明这一次修改新增或调整了什么。
@Comments      : Add the relevant run/test command or a short execution note.
'''
```

For C++:

```cpp
/*
@Date          : 2025/12/06 16:42:18
@Author        : Altair.Zheng
@version       : 1.0
@Description   : 用中文简要说明这段文件或代码块的作用。
@Description1  : 用中文说明这一次修改新增或调整了什么。
@Comments      : Add the relevant build/run/test command or a short execution note.
*/
```

If the target file has language-specific style constraints, keep the same fields and alignment while using valid native comment syntax.

