feature-flags-python
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "feature-flags-python" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-63bb384bfe067e67134ac8ebf4c9d5879f2481df094dc6dab740df923fb49067. Verify the upstream source and version against https://skills.sh/posthog/skills/feature-flags-python before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skills.sh
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
PostHog feature flags for Python applications.
Introduction source: third_party · posthog · 1.0.0 Reference
SkillPi interpretation
- Tasks
- PostHog feature flags for Python applications
- Testing
- Not tested
Browse files
Frontmatter
name: feature-flags-python
description: PostHog feature flags for Python applications
metadata:
author: PostHog
version: 1.9.4PostHog feature flags for Python
This skill helps you add PostHog feature flags to Python applications.
Reference files
references/python.md- Python feature flags installation - docsreferences/adding-feature-flag-code.md- Adding feature flag code - docsreferences/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
- Remember that source code is available in the venv/site-packages directory
- posthog is the Python SDK package name
- Install dependencies with
pip install posthogorpip install -r requirements.txtand do NOT use unquoted version specifiers like>=directly in shell commands - In CLIs and scripts: MUST call posthog.shutdown() before exit or all events are lost
- Always use the Posthog() class constructor (instance-based API) instead of module-level posthog.api_key config
- Always include enable_exception_autocapture=True in the Posthog() constructor to automatically track exceptions
- NEVER send PII in capture() event properties — no emails, full names, phone numbers, physical addresses, IP addresses, or user-generated content
- PII belongs in identify() person properties, NOT in capture() event properties. Safe event properties are metadata like message_length, form_type, boolean flags.
- Register posthog_client.shutdown with atexit.register() to ensure all events are flushed on exit
- The Python SDK has NO identify() method — use posthog_client.set(distinct_id=user_id, properties={...}) to set person properties, or use identify_context(user_id) within a context
Current listing version
1.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- PostHog功能开关是Python开发中常见需求,具有广泛受众的实用能力
- 提供了清晰的框架指南和最佳实践
Highlights
- 触发词精准完整,覆盖多种变体,边界清晰
- description明确指出了适用场景和目标用户
Areas to improve
-
缺少When to Use章节 Reported severity: Minor
文档中缺少明确的When to Use章节,用户可能不清楚何时使用此Skill
Recommendation: 建议添加When to Use章节,说明在什么场景下使用此Skill
-
缺少示例章节 Reported severity: Minor
文档中缺少具体的代码示例,用户可能难以理解如何实际使用
Recommendation: 建议添加示例章节,提供具体的代码示例和使用场景
Highlights
- Phase/步骤清晰,有出口条件
- frontmatter完整,单文件≤500行
Highlights
- 工具来源明确,参数正确
- 覆盖主要异常,不可逆操作有确认机制
- 提供了详细的框架指南和最佳实践
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 36 -
Accounts, secrets or authorization
Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.
Mentioned in main document · lines 38
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.