SuperAPI AI Directory

nsfc-qc

Writing & research

View repository

Updated 10-15 21:40

About this skill

NSFC Proposal Quality Control
  • Read-only QC: do not modify .tex/.bib/.cls/.sty
  • The goal is to produce a standardized QC report, not to "conveniently help the user revise the text"
  • Recommended layout:deliver_dir/ for deliverables,project_root/.bensz-api/task-{yyyymmdd-hhmm}-{简短描述}/nsfc-qc/{run_id}/ for the workspace

Input

At minimum required:

  • project_root

Recommended to also provide:

  • main_tex, default main.tex
  • threads, default read config.yaml
  • execution, default serial
  • deliver_dir, recommended to specify explicitly for instance isolation

Non-goals

  • nsfc-qc is not a compile-check tool.
  • Whether the PDF compiles successfully is an environment/engineering quality issue, not the core deliverable of this skill.

Workflow

Input

Provide the necessary inputs according to the user request and configuration file; missing information should be clearly listed and steps that depend on that input should stop.

Execution steps

  • When a bug caused by a design flaw in this skill appears in the user's environment, prioritize using bensz-collect-bugs to record it to ~/.bensz-skills/bugs/according to the specification; it is strictly forbidden to directly modify the skill source code installed in the user's local Claude Code / Codex.
  • If the AI can still complete the user's task through a workaround, it should first record the bug, then continue completing the current task.
  • When the user explicitly requests public reporting actions such as "report bensz skills bugs", call the local gh and bensz-collect-bugs, and only upload newly added bugs to huangwb8/bensz-bugs; do not pull / clone the entire bug repository.

Locate the run directory

  • Prefer the instance-isolated layout:
    • deliver_dir
    • workspace_dir=project_root/.bensz-api/task-{yyyymmdd-hhmm}-{简短描述}/nsfc-qc/{run_id}
    • run_dir={workspace_dir}
  • Only read when the user explicitly requests legacy or is handling old artifacts project_root/.nsfc-qc/

Read-only precheck

  • Automatically detect the main tex
  • Check whether citation keys exist
  • Check .bib field completeness
  • Generate citation evidence package: Crossref / arXiv / Unpaywall and other metadata + URL accessibility + title comparison
  • Output preliminary screening of length distribution, quotation mark issues, abbreviations, and terminology consistency

Multithreaded independent QC

  • Prefer parallel-vibe, and put .parallel-vibe/ inside the current run
  • The snapshot contains only the minimum necessary copies:*.tex/*.bib + precheck evidence package
  • Each thread covers at least:
    • Writing style and readability
    • Citation authenticity and misattribution risk
    • Length and structure distribution
    • Logic and argument closure
    • Abbreviation conventions
    • Terminology consistency
    • At least 2 other types of QC

Aggregation and summary

  • The main thread merges the threads' RESULT.md
  • deduplication, conflict handling, sorting by P0/P1/P2 sorting
  • Output the minimum executable revision roadmap

Standardized report

The final report must include:

  1. Executive summary
  2. Scope and read-only statement
  3. Hard issues (P0)
  4. Important suggestions (P1)
  5. Optional optimizations (P2)
  6. Citation verification checklist
  7. Length and structural distribution
  8. Suggested minimal revision roadmap
  9. Appendix: Reproduction information
# 一键运行
python3 skills/nsfc-qc/scripts/nsfc_qc_run.py \
  --project-root projects/NSFC_Young \
  --main-tex main.tex \
  --deliver-dir projects/NSFC_Young/QC/vYYYYMMDDHHMMSS \
  --threads 5 \
  --execution serial

# 预检
python3 skills/nsfc-qc/scripts/nsfc_qc_precheck.py --project-root projects/NSFC_Young --main-tex main.tex --out <artifacts_dir> --resolve-refs

# 并行 QC
python3 skills/nsfc-qc/scripts/run_parallel_qc.py --project-root projects/NSFC_Young --run-id vYYYYMMDDHHMMSS --threads 5 --execution serial

# 物化 final 输出
python3 skills/nsfc-qc/scripts/materialize_final_outputs.py --project-root projects/NSFC_Young --run-id vYYYYMMDDHHMMSS

Output

Standard deliverables:

  • {run_dir}/final/nsfc-qc_report.md
  • {run_dir}/final/nsfc-qc_metrics.json
  • {run_dir}/final/nsfc-qc_findings.json
  • {run_dir}/final/validation.json

Common pre-check artifacts:

  • precheck.json
  • citations_index.csv
  • tex_lengths.csv
  • reference_evidence.jsonl
  • reference_evidence_summary.json

Output management

Intermediate files for new tasks of this Skill are uniformly written to ./.bensz-api/task-{yyyymmdd-hhmm}-{简短描述}/{skill名}/input|output|log/. The same task reuses one task root directory; only multi-Skill collaboration creates shared/. Formal deliverables are not written to this directory; historical hidden directories only allow explicit compatible reading, migration, or cleanup.

Validation

After completion, execute the Skill's existing static checks, script validation, or manual review, and record the pass criteria.

Failure and recovery

  • If parallel-vibe is unavailable, the same QC checklist must still be completed.
  • A standardized report and JSON must still be output.
  • Explain in the appendix the reason parallelism was not enabled.

Constraints

  • Writing to the bid source files is prohibited.
  • Literature authenticity checks must have an evidence chain; when uncertain, mark uncertain。
  • Metadata acquisition is mandatory: citation authenticity verification must fetch paper metadata online and perform URL/title comparison.
  • nsfc-qc is not responsible for main text rewriting; it is only responsible for identifying problems and providing suggestions.

Common hard constraints

  • When a task needs to be persisted to disk, use a unique ./.bensz-api/task-{yyyymmdd-hhmm}-{简短描述}/ root directory; shared materials go into shared/, and Skill-specific materials go into that Skill's input/、output/、log/。
  • Formal deliverables, source code, and formal plans are saved according to project conventions and are not written to the task workspace; without authorization, do not overwrite, delete, migrate, or write remotely.
  • Project maintenance changes check BAC availability and record requirements, AI outputs, tool results, file changes, and validation summaries; BAC only performs process auditing and does not replace attribution, responsibility, or compliance judgment.
  • Do not record API Keys, access tokens, passwords, Cookies, environment/credential files, private Prompts, identity information, local usernames, hostnames, or unnecessary large raw data.
  • File paths must be normalized and restricted to the authorized project scope; external URLs, subprocesses, and network access follow least privilege to prevent path traversal, SSRF, and command injection.
  • The Skill version is uniquely recorded in its own config.yaml:skill_info.version; public API, protocol, directory, or configuration changes are synchronized with documentation and CHANGELOG.md。
  • Only design flaws in the Skill or Bensz infrastructure itself are submitted to bensz-collect-bugs; first desensitize and write to ~/.bensz-skills/bugs/, the current task is not interrupted, public reporting only occurs when the user explicitly requests it, and directly modifying the user's installed Skill source code is prohibited.

Skill-specific constraints

Must not exceed the scope declared in this Skill description and the process above; do not disguise unverified information as definitive conclusions.