ctxpipe: Skill for Claude Code

.agents/skills/organization-best-practices/SKILL.md

organization-best-practices is a skill for Claude Code, Codex from ctxpipe-ai/ctxpipe. It costs 34 tokens per session (2,925 once invoked), scanned A, original, MIT.

A guide for implementing organizations, teams, and role-based access control with Better Auth's organization plugin. Role-based access control means deciding which users can perform specific actions.

In plain words
What is it for?
Use it when adding organization membership, teams, roles, or permission checks to an application that uses Better Auth.
Why use it?
It provides rules for handling shared accounts and permissions consistently across a multi-tenant application, where separate customers or groups use the same system.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is ctxpipe-ai/ctxpipe's own configuration. It tells Claude Code and Codex how to work on ctxpipe itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ctxpipe configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ctxpipe-ai/ctxpipe. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ctxpipe-ai/ctxpipe/main/.agents/skills/organization-best-practices/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/ctxpipe-ai/ctxpipe

Made for: Claude Code, Codex.

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 organization-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/ctxpipe-ai/ctxpipe/organization-best-practices/github.svg)](https://agentmods.dev/skills/ctxpipe-ai/ctxpipe/organization-best-practices)
Your own site
<a href="https://agentmods.dev/skills/ctxpipe-ai/ctxpipe/organization-best-practices"><img src="https://agentmods.dev/badge/skills/ctxpipe-ai/ctxpipe/organization-best-practices/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for organization-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/ctxpipe-ai/ctxpipe/organization-best-practices"><img src="https://agentmods.dev/badge/skills/ctxpipe-ai/ctxpipe/organization-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,925 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 original No closer match found 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.00034 $0.02925
Opus 5.5 $0.00014 $0.01170
Sonnet 5.5 $0.00007 $0.00585
Haiku 4.5 $0.00003 $0.00293

Measured 1mo ago against content hash 8f717ab6cfbd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

organization-best-practices 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 1mo 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.

.agents/skills/organization-best-practices/SKILL.md · 587 lines

How it starts

The opening of the file, as written. The whole thing — 587 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Setting Up Organizations

When adding organizations to your application, configure the organization plugin with appropriate limits and permissions.

import { betterAuth } from "better-auth";
import { organization } from "better-auth/plugins";

export const auth = betterAuth({
  plugins: [
    organization({
      allowUserToCreateOrganization: true,
      organizationLimit: 5, // Max orgs per user
      membershipLimit: 100, // Max members per org
    }),
  ],
});

Note: After adding the plugin, run npx @better-auth/cli migrate to add the required database tables.

Client-Side Setup

Add the client plugin to access organization methods:

import { createAuthClient } from "better-auth/client";
import { organizationClient } from "better-auth/client/plugins";

export const authClient = createAuthClient({
  plugins: [organizationClient()],
});

Creating Organizations

Organizations are the top-level entity for grouping users. When created, the creator is automatically assigned the owner role.

const createOrg = async () => {
  const { data, error } = await authClient.organization.create({
    name: "My Company",
    slug: "my-company",
    logo: "https://example.com/logo.png",
    metadata: { plan: "pro" },
  });
};

Controlling Organization Creation

Restrict who can create organizations based on user attributes:

organization({
  allowUserToCreateOrganization: async (user) => {
    return user.emailVerified === true;
  },
  organizationLimit: async (user) => {
    // Premium users get more organizations
    return user.plan === "premium" ? 20 : 3;
  },
});

Creating Organizations on Behalf of Users

Administrators can create organizations for other users (server-side only):

await auth.api.createOrganization({
  body: {
    name: "Client Organization",
    slug: "client-org",
    userId: "user-id-who-will-be-owner", // `userId` is required
  },
});

Note: The userId parameter cannot be used alongside session headers.

Read the full file on GitHub · 587 lines

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. 1mo ago First seen · 587 lines · 34 tokens per session scan A 8f717ab6cfbd

Subscribe to this mod's changes

organization-best-practices is a skill published in the GitHub repository ctxpipe-ai/ctxpipe (27 stars, last pushed today), licensed MIT. It adds 34 tokens to every session and 2,925 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

design-an-interface

Generate radically-different module or API contract designs in parallel, then compare on depth, simplicity, and ease-of-correct-use. Trigger when the user is shaping a new module surface, exploring contract options, comparing module shapes, or applying "design it twice" to a first-pass sketch.

OutlineDriven/odin-gemini-cli-extension · 62 tokens

moai-ref-api-patterns

REST/GraphQL API design patterns, error handling conventions, and input validation reference for backend development. Agent-extending skill that amplifies backend domain work (spawned via Agent(general-purpose) with backend instructions) with production-grade API patterns. Use when designing APIs, implementing…

modu-ai/moai-adk · 85 tokens

inkbox-agent-self-signup

Use when guiding or implementing the Inkbox agent self-signup flow, including verification, resend-verification, signup restrictions, and optional signup fields like agent handles or mailbox local parts.

inkbox-ai/inkbox · 43 tokens

loom-event-driven

Event-driven architecture: message queues, pub/sub, event sourcing, CQRS, sagas. Not for: webhooks.

cosmix/loom · 29 tokens

blueprint-from-collection-actions

Build the source's actions and ingests the spec decided to build, and write down the ones left to a person.

receptron/mulmoterminal · 31 tokens

blueprint-from-collection-actions

Build the source's actions and ingests the spec decided to build as Postgres functions and Supabase Edge Functions, and write down the ones left to a person.

receptron/mulmoterminal · 40 tokens