Token导航 LogoToken导航TokenDH.com
待分类需要联网github未标认证来源可访问clear审计异常

compile-compcert编译 comcert

Agent Skill

compile-compcert 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

824

周安装

33

GitHub Stars

93

下载量

267
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:compile-compcert(编译 comcert)
来源仓库:https://github.com/letta-ai/skills
仓库路径:skills/compile-compcert
安装命令:
npx skills add https://github.com/letta-ai/skills --skill compile-compcert
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/letta-ai/skills --skill compile-compcert

简介

compile-compcert 用于协助编译形式化验证的 CompCert C 编译器。

  • 重点在于预编译检查 Coq 版本兼容性和容器环境资源限制。
  • 指导获取源码、审查配置脚本和依赖说明,确保构建条件满足。
  • 需手动下载源码并检查 configure 脚本中的 Coq 要求。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Compile CompCert

Overview

CompCert is a formally verified C compiler built with Coq proof assistant. Building it from source requires careful attention to dependency versions, particularly Coq compatibility, and resource constraints in containerized environments.

Pre-Build Investigation (Critical First Step)

Before installing any dependencies, download and examine CompCert's requirements:

  1. Download CompCert source first

- Obtain the source tarball or clone the repository - Check the configure script for version requirements: grep -i "coq" configure - Review README or INSTALL files for dependency specifications

  1. Identify exact Coq version requirements

- CompCert has strict Coq version bounds (e.g., CompCert 3.13.1 requires Coq ≤ 8.16.1) - Installing an incompatible Coq version wastes significant time and resources - Check both minimum and maximum supported versions

  1. Assess system environment

- Check architecture: uname -m (typically x86_64) - Check available memory: free -h - Determine if running in container (affects swap, permissions) - Verify privileged operations availability (swap creation usually fails in containers)

Dependency Chain

Install dependencies in this order, with version awareness:

1. System Packages

Install all system dependencies in a single command:

apt-get update && apt-get install -y opam gcc g++ make libgmp-dev pkg-config

2. OCaml/opam Setup

opam init -y --disable-sandboxing
eval $(opam env)

Memory optimization: Set job limit immediately after init to prevent OOM:

opam config set-global jobs 1

3. Coq Installation (Version Critical)

  • Do NOT install latest Coq - check CompCert's requirements first
  • Install the correct version: opam install coq.X.Y.Z menhir
  • Common compatible versions:

- CompCert 3.13.x: Coq 8.16.1 or earlier - CompCert 3.12.x: Coq 8.15.x or earlier

4. CompCert Build

./configure <target-arch>   # e.g., x86_64-linux
make
make install PREFIX=<path>

Memory Management in Constrained Environments

Coq and CompCert compilation are memory-intensive:

  1. Limit parallel jobs: opam config set-global jobs 1 before any opam install
  2. Do NOT attempt swap creation in containers - swapon fails with "Operation not permitted"
  3. Monitor memory usage during compilation: watch free -h
  4. If OOM occurs: Kill stuck processes and retry with lower parallelism

Verification Strategy

After build completion, verify:

  1. Binary exists and is executable test -x /path/to/ccomp && echo "exists"
  2. Compiler functions correctly echo 'int main() {return 0;}' > /tmp/test.c ccomp -o /tmp/test /tmp/test.c /tmp/test && echo "success"
  3. Expected behavior for unsupported features

- CompCert should reject certain C features (e.g., some GNU extensions) - Test with known unsupported constructs to verify proper rejection

Common Pitfalls

Version Mismatch (Most Common)

  • Symptom: Build fails with Coq compatibility errors
  • Cause: Installed Coq version outside CompCert's supported range
  • Prevention: Always check configure script before installing Coq

OOM During Coq Installation

  • Symptom: Process killed, system becomes unresponsive
  • Cause: Parallel compilation exceeds available memory
  • Prevention: Set jobs 1 immediately after opam init

Missing System Dependencies

  • Symptom: Configure or build fails with missing library errors
  • Cause: Incremental dependency installation
  • Prevention: Install all system packages upfront (libgmp-dev, pkg-config, etc.)

Binary Path Confusion

  • Symptom: make install places binary in unexpected location
  • Cause: Default PREFIX vs expected installation path differ
  • Prevention: Specify exact paths during configure, or create symlinks post-install

Swap Creation Failure in Containers

  • Symptom: swapon failed: Operation not permitted
  • Cause: Container lacks privileges for swap operations
  • Prevention: Do not attempt swap creation; rely on job limiting instead

Efficient Build Workflow Summary

  1. Download CompCert source
  2. Check version requirements in configure script
  3. Assess system resources and environment
  4. Install ALL system packages in one command
  5. Initialize opam with job limit set to 1
  6. Install correct Coq version (not latest)
  7. Configure and build CompCert
  8. Verify binary location and create symlinks if needed
  9. Run verification tests

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.26%
按下载量换算75

Gemini CLI

23.81%
按下载量换算64

Antigravity

17.73%
按下载量换算47

windsurf

13.08%
按下载量换算35

OpenCode

7.33%
按下载量换算20

Codex

3.03%
按下载量换算8

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills