feature-flags-rust

feature-flags-rust is a skill for Claude Code from PostHog/skills. It costs 14 tokens per session (289 once invoked), scanned A, a copy of feature-flags-api, MIT.

A Rust guide for adding PostHog feature flags, which let you turn code-controlled features on or off.

In plain words
What is it for?
Use it to install PostHog feature flags in Rust, add boolean checks, and prefer server-side evaluation when appropriate.
Why use it?
It helps introduce flags without replacing existing logic and keeps their access keys in environment variables.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the posthog-all plugin — 62 skills, 1 hook shipped together

Good fit Use it to install PostHog feature flags in Rust, add boolean checks…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/posthog/skills/feature-flags-rust
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PostHog/skills --skill feature-flags-rust
Clone the repo
git clone --depth 1 https://github.com/PostHog/skills

Made for: Claude Code.

Or install posthog-all, the plugin that ships this one along with the rest of its 62 skills, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for feature-flags-rust

README.md
[![agentmods](https://agentmods.dev/badge/skills/posthog/skills/feature-flags-rust.svg)](https://agentmods.dev/skills/posthog/skills/feature-flags-rust)
Your own site
<a href="https://agentmods.dev/skills/posthog/skills/feature-flags-rust"><img src="https://agentmods.dev/badge/skills/posthog/skills/feature-flags-rust.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 289 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 84% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00014 $0.00289
Opus 5 $0.00007 $0.00144
Sonnet 5 $0.00003 $0.00058
Haiku 4.5 $0.00001 $0.00029

Measured 3d ago against content hash 76abea82ac3f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

feature-flags-rust scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

84% identical to feature-flags-api — 10 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/posthog/all/skills/feature-flags-rust/SKILL.md · 35 lines

What it actually says

PostHog feature flags for Rust

This skill helps you add PostHog feature flags to Rust applications.

Reference files

  • references/rust.md - Rust feature flags installation - docs
  • references/adding-feature-flag-code.md - Adding feature flag code - docs
  • references/best-practices.md - Feature flag best practices - docs

Consult the documentation for API details and framework-specific patterns.

Key principles

  • Environment variables: Always use environment variables for PostHog keys. Never hardcode them.
  • Minimal changes: Add feature flag code alongside existing logic. Don't replace or restructure existing code.
  • Boolean flags first: Default to boolean flag checks unless the user specifically asks for multivariate flags.
  • Server-side when possible: Prefer server-side flag evaluation to avoid UI flicker.

PostHog MCP tools

Check if a PostHog MCP server is connected. If available, look for tools related to feature flag management (creating, listing, updating, deleting flags). Use these tools to manage flags directly in PostHog rather than requiring the user to do it manually in the dashboard.

Framework guidelines

No specific framework guidelines.

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 35 lines · 14 tokens per session scan A 76abea82ac3f

Subscribe to this mod's changes

feature-flags-rust is a skill published in the GitHub repository PostHog/skills (60 stars, last pushed yesterday), licensed MIT. It adds 14 tokens to every session and 289 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 84% identical to feature-flags-api, differing in 10 lines, and is treated as a copy.