managing-github-actions-secrets

Creates and updates organization-level GitHub Actions secrets for PostHog CI workflows.

713|118|Updated Aug 11, 2020
One-click install
npx skills add https://github.com/PostHog/posthog-foss --skill managing-github-actions-secrets
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: managing-github-actions-secrets
Source: https://github.com/PostHog/posthog-foss/tree/main/.agents/skills/managing-github-actions-secrets
Command: npx skills add https://github.com/PostHog/posthog-foss --skill managing-github-actions-secrets

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Teams often add GitHub Actions secrets at the wrong scope, exposing credentials to too many repositories or scattering secrets across individual repos. This Skill enforces PostHog's policy of centralizing all CI secrets at the organization level with controlled per-repository access.

Core Features & Use Cases

  • Org-level secret creation: Guides creating secrets on the posthog org via gh secret set --org posthog or the GitHub UI, never at the repo level.
  • Scoped repository access: Shows how to grant secrets to selected repositories using --visibility selected --repos instead of exposing them org-wide.
  • Safe secret handling: Enforces piping values from stdin or files so secrets never appear in shell history, chat, commits, or logs.
  • Use Case: When wiring a new workflow to a package registry credential referenced as ${{ secrets.POSTHOGOS_PACKAGER_KEY }}, use this Skill to create the secret at the org level and grant access only to the repos that need it.

Quick Start

Ask the assistant to create a new GitHub Actions secret for a PostHog workflow and grant it access to the specific repositories that need it.

Frequently Asked Questions about managing-github-actions-secrets

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a GitHub Actions secret to an organization?

Use gh secret set with the --org flag, piping the value from stdin so it never appears in shell history. For example, run pbpaste | gh secret set SECRET_NAME --org posthog, then verify with gh secret list --org posthog.

How do I restrict an org secret to specific repositories?

Pass --visibility selected along with --repos listing the exact repositories when running gh secret set. In the GitHub UI, choose Selected repositories under Repository access instead of All repositories.

Should I create GitHub secrets at the repo level or org level?

PostHog policy requires all GitHub Actions secrets at the organization level, granted to specific repos via access control. Repo-level secrets should be migrated to the org and then deleted from the repo.

What should I do if a secret value is accidentally exposed?

Rotate the exposed secret immediately by setting a new value at the org level. Never paste secret values into chat, PR descriptions, commit messages, or files in the first place.

When is a repo-level or environment-scoped secret acceptable?

Environment-scoped secrets on deployment environments are a different mechanism and a valid exception. Otherwise, only deviate from org-level secrets when the user explicitly overrides the default policy.