用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/SWMFsoftware/FLEKS --skill generate-docs命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Create new compiled .cpp/.h files or selectable FLEKS user source templates following project conventions
Compile FLEKS standalone or as an SWMF component, build the converter, and regenerate compile_commands.json
Find unused variables, check formatting, apply fixes following FLEKS coding standards
基于 SOC 职业分类
正在显示 SKILL.md
| name | generate-docs |
| description | Build documentation from code comments and LaTeX sources |
This skill handles documentation generation for FLEKS.
| Type | Location |
|---|---|
| Algorithm documentation | docs/Algorithm.tex |
| Coding standards | docs/Coding_standards.md |
| Parameter documentation | PARAM.XML |
| User source templates | userfiles/*Source.h and Config.pl -u |
| Project overview (agent) | AGENT.md (root and subdirectories) |
cd docs
pdflatex Algorithm.tex
For full build with references:
cd docs
pdflatex Algorithm.tex
pdflatex Algorithm.tex # Run twice for references
open docs/Algorithm.pdf # macOS
The Algorithm.tex covers:
If you want to add Doxygen-style documentation:
brew install doxygen # macOS
# Run from FLEKS project root
doxygen -g
Key settings to modify:
PROJECT_NAME = "FLEKS"
INPUT = include src
FILE_PATTERNS = *.h *.cpp
EXTRACT_ALL = YES
GENERATE_LATEX = NO
doxygen Doxyfile
Output will be in html/index.html.
/**
* @brief A brief description of the class.
*
* A more detailed description of what this class does,
* its purpose, and usage patterns.
*/
class MyClass {
/**
* @brief Brief description of the function.
*
* @param param1 Description of first parameter
* @param param2 Description of second parameter
* @return Description of return value
*
* @note Any important notes about usage
* @warning Any warnings about side effects
*/
int my_function(int param1, double param2);
class MyClass {
private:
int count_; ///< Number of items processed
double tolerance_; ///< Convergence tolerance for solver
};
The PARAM.XML file documents all input parameter commands. It uses
SWMF's XML schema with <command>, <parameter>, <for>, and inline
description text. Example structure:
<command name="TIMESTEPPING"
alias="TIMESTEPPING_FLEKS0,TIMESTEPPING_FLEKS1"
multiple="T">
<parameter name="useFixedDt" type="logical" default="F"/>
<parameter name="dt" type="real" if="$useFixedDt"/>
<parameter name="cfl" type="real" default="0.2" if="not $useFixedDt"/>
#TIMESTEPPING
F useFixedDt
0.1 cfl (if useFixedDt is false)
Setting the CFL or fixed time step. The typical CFL number is 0.1~0.4.
</command>
When adding a new parameter command:
<command> block to PARAM.XMLread_param() method
(typically Domain.cpp or Pic.cpp)For user source behavior, keep #SOURCE in PARAM.XML aligned with
Domain.cpp and the selection workflow in Config.pl -u. Add reusable source
implementations under userfiles/*Source.h; include/UserSource.h is the
selected copy generated by Config.pl.
The project maintains AGENT.md files in key directories:
| File | Purpose |
|---|---|
AGENT.md | Root project overview, architecture, build system |
include/AGENT.md | Header file catalog and conventions |
src/AGENT.md | Implementation file guide and Makefile details |
srcInterface/AGENT.md | SWMF coupling layer documentation |
Update these when adding new classes, files, or changing architecture.
PARAM.XML is up-to-date with new parametersAlgorithm.tex reflects current implementationAGENT.md files updated for new files/classes