OpenParable
Skip to content
← Back to skills

Conscrypt Formatting

Development
conscrypt-formatting

Conscrypt Formatting is an Agent Skill for development published in the google/conscrypt repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Automatically formats C++, Java, and C source files in the Conscrypt directory using a project-specific formatting tool. Use when you have modified any C++, Java, or C files under `third_party/java/conscrypt/main_src/` and need to ensure they comply with project style before committing or submitting. Don't use for general Google3 formatting (use the standard `g4 fix` or `hg fix` instead unless working in Conscrypt).

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/google/conscrypt/blob/HEAD/skills/conscrypt_formatting/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/conscrypt-formatting, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Conscrypt Formatting

When modifying C++, C, or Java files in the Conscrypt project, you MUST run the project's custom formatting script. The standard g4 fix or global formatters are not sufficient as Conscrypt uses a specific configuration.

Critical Rules

  1. Run after modifications: Always run the formatter after making any changes to .java, .cc, .h, .cpp, or .c files in Conscrypt, and before creating a CL, uploading, or submitting.
  2. Files must be opened: The formatting script only processes files that are currently opened for edit in your VCS (e.g., via g4 edit, hg edit, etc.). Ensure your modified files are opened before running the script.

How to Format

Run the Python script located in the Conscrypt root directory:

python3 third_party/java/conscrypt/main_src/fix_format.py