Skip to content
SkillModel-led1,591 tokens in use

ctf-ai-ml

A quick reference for AI and machine learning CTF challenges, covering model weights, adversarial examples, LLM prompt attacks and model extraction.

3,753 stars on the repository MIT Licenseljagiello/ctf-skills · ctf-ai-ml
npx skills add ljagiello/ctf-skills
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing ctf-ai-ml costs

68tokens idle
1,591tokens in use
17,247tokens, up to

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Up to adds the files its instructions link. Counts are approximate, made offline with cl100k_base.

Model dependence Model-led

Script-ledMixedModel-led

Mostly instructions, so how well it works depends on the model that follows them.

This describes the skill's structure, how much of it is scripts. It does not say how well it works.

Touches

shelldeclared and detectednetworkdeclared and detectedwrites filesdeclared

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Good
  • Frontmatter15/15
  • Structure14/25
  • Examples12/15
  • Output5/15
  • Size15/15
  • Resources15/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Good
  • Reaches the network−5

    does this on the machine, as the frontmatter declares

    SKILL.md, line 20
  • Runs shell commands−2

    does this on the machine, as the frontmatter declares

    SKILL.md, line 20
  • Overrides the user's instructions−25

    tells the model to ignore its instructions or to hide what it does from the user

    llm-attacks.md, line 162

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Good
  • Development activity88
  • Maintenance48
  • Community56
  • Maturity32
  • Momentum40

ctf-ai-ml is one of the category skills in the ctf-skills collection. It gives an agent a short index of techniques for AI and machine learning challenges in capture-the-flag competitions, with each technique pointing to a supporting file for detail.

The skill covers inspecting model files, comparing weights, adversarial example generation, prompt injection and jailbreaking, model extraction and membership inference. It also says when to hand a challenge to the crypto, reverse or misc skills of the same collection.

What You Get

  • A prerequisites list for the Python packages the techniques need
  • Quick-start commands to inspect PyTorch, safetensors, HuggingFace and LoRA adapter files and compare two sets of weights
  • One-line technique summaries with links into three detailed reference files
  • Pivot rules that name the crypto, reverse and misc skills for challenges that leave the ML domain

Common Use Cases

  • Recovering a behavior that a fine-tuned model was trained to suppress by comparing it with the original weights
  • Working out how to approach a challenge that gives you a classifier and asks for a misclassified input
  • Testing a challenge chatbot for prompt injection or tokenizer-level filter gaps
  • Deciding whether a puzzle that wraps a model is really a crypto or reverse engineering task

What Makes It Unique

Most CTF skills target binaries or web apps. This one is limited to the ML side of competitions: model files, LoRA adapters, adversarial inputs and LLM filters. It keeps the main file short, as a table of contents, and moves the long walkthroughs into separate files that the agent opens when a technique applies. It is marked as not directly invocable, so it loads from context or from the solve-challenge dispatcher.

Under The Hood

The skill is instructions only, with no scripts of its own. It tells the agent to run Python and shell commands to inspect model files, install packages with pip, and use curl to send test prompts to a challenge endpoint. Its frontmatter lists shell, file read and write, web fetch and web search as allowed tools, so the agent can run commands, write files and reach the network while following it. The reference files contain example prompts, written for a challenge chatbot, that tell a model to ignore its instructions; they are sample test inputs for competition targets.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers