[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M751FFSZ4V8JYYB7ZY7WGD1D":3,"skill-same:01M751FFSZ4V8JYYB7ZY7WGD1D":91},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":37,"commitSha":38,"skillDirectory":5,"forksCount":14,"repositoryHtmlUrl":39,"repositoryHomepageUrl":6,"ownerHtmlUrl":40,"ownerBlogUrl":41,"ownerDescription":6,"updatedAt":42,"install":43,"resources":56},"01M751FFSZ4V8JYYB7ZY7WGD1D","implementing-policy-as-code-with-open-policy-agent",null,"This skill covers implementing Open Policy Agent (OPA) and Gatekeeper for policy-as-code enforcement in Kubernetes and CI\u002FCD pipelines. It addresses writing Rego policies, deploying OPA Gatekeeper as a Kubernetes admission controller, testing policies in development, and integrating policy evaluation into deployment pipelines.","SamuelChien\u002Fmega-skills-collection","SamuelChien","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F4652114?v=4","01M74KK34WVHA0P5ZYSJRDDFMG","Samuel Chien","01M74KK35FQN1N9VZ9EPTH3P2S",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fimplementing-policy-as-code-with-open-policy-agent\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fimplementing-policy-as-code-with-open-policy-agent\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: implementing-policy-as-code-with-open-policy-agent\ndescription: >\n  This skill covers implementing Open Policy Agent (OPA) and Gatekeeper for policy-as-code\n  enforcement in Kubernetes and CI\u002FCD pipelines. It addresses writing Rego policies, deploying\n  OPA Gatekeeper as a Kubernetes admission controller, testing policies in development, and\n  integrating policy evaluation into deployment pipelines.\ndomain: cybersecurity\nsubdomain: devsecops\ntags: [devsecops, cicd, opa, gatekeeper, policy-as-code, kubernetes, secure-sdlc]\nversion: 1.0.0\nauthor: mahipal\nlicense: Apache-2.0\n---\n\n# Implementing Policy as Code with Open Policy Agent\n\n## When to Use\n\n- When enforcing organizational security policies across Kubernetes clusters programmatically\n- When requiring admission control that blocks non-compliant resources from being created\n- When implementing policy governance that can be version-controlled, tested, and audited\n- When standardizing security rules across multiple clusters and environments\n- When needing a flexible policy engine that extends beyond Kubernetes to APIs and CI\u002FCD\n\n**Do not use** for vulnerability scanning (use Trivy\u002FCheckov), for runtime threat detection (use Falco), or for network policy enforcement (use Kubernetes NetworkPolicy or Calico).\n\n## Prerequisites\n\n- Kubernetes cluster with admin access for Gatekeeper installation\n- Helm for Gatekeeper deployment\n- OPA CLI or conftest for local policy testing\n- Rego knowledge for policy authoring\n\n## Workflow\n\n### Step 1: Install OPA Gatekeeper\n\n```bash\n# Install Gatekeeper via Helm\nhelm repo add gatekeeper https:\u002F\u002Fopen-policy-agent.github.io\u002Fgatekeeper\u002Fcharts\nhelm install gatekeeper gatekeeper\u002Fgatekeeper \\\n  --namespace gatekeeper-system --create-namespace \\\n  --set replicas=3 \\\n  --set audit.replicas=1 \\\n  --set audit.writeToRAMDisk=true\n```\n\n### Step 2: Create Constraint Templates\n\n```yaml\n# templates\u002Fk8s-required-labels.yaml\napiVersion: templates.gatekeeper.sh\u002Fv1\nkind: ConstraintTemplate\nmetadata:\n  name: k8srequiredlabels\nspec:\n  crd:\n    spec:\n      names:\n        kind: K8sRequiredLabels\n      validation:\n        openAPIV3Schema:\n          type: object\n          properties:\n            labels:\n              type: array\n              items:\n                type: string\n  targets:\n    - target: admission.k8s.gatekeeper.sh\n      rego: |\n        package k8srequiredlabels\n        violation[{\"msg\": msg}] {\n          provided := {label | input.review.object.metadata.labels[label]}\n          required := {label | label := input.parameters.labels[_]}\n          missing := required - provided\n          count(missing) > 0\n          msg := sprintf(\"Missing required labels: %v\", [missing])\n        }\n\n---\n# templates\u002Fk8s-container-limits.yaml\napiVersion: templates.gatekeeper.sh\u002Fv1\nkind: ConstraintTemplate\nmetadata:\n  name: k8scontainerlimits\nspec:\n  crd:\n    spec:\n      names:\n        kind: K8sContainerLimits\n      validation:\n        openAPIV3Schema:\n          type: object\n          properties:\n            cpu:\n              type: string\n            memory:\n              type: string\n  targets:\n    - target: admission.k8s.gatekeeper.sh\n      rego: |\n        package k8scontainerlimits\n        violation[{\"msg\": msg}] {\n          container := input.review.object.spec.containers[_]\n          not container.resources.limits.cpu\n          msg := sprintf(\"Container %v has no CPU limit\", [container.name])\n        }\n        violation[{\"msg\": msg}] {\n          container := input.review.object.spec.containers[_]\n          not container.resources.limits.memory\n          msg := sprintf(\"Container %v has no memory limit\", [container.name])\n        }\n\n---\n# templates\u002Fk8s-block-privileged.yaml\napiVersion: templates.gatekeeper.sh\u002Fv1\nkind: ConstraintTemplate\nmetadata:\n  name: k8sblockprivileged\nspec:\n  crd:\n    spec:\n      names:\n        kind: K8sBlockPrivileged\n  targets:\n    - target: admission.k8s.gatekeeper.sh\n      rego: |\n        package k8sblockprivileged\n        violation[{\"msg\": msg}] {\n          container := input.review.object.spec.containers[_]\n          container.securityContext.privileged == true\n          msg := sprintf(\"Privileged container not allowed: %v\", [container.name])\n        }\n        violation[{\"msg\": msg}] {\n          container := input.review.object.spec.initContainers[_]\n          container.securityContext.privileged == true\n          msg := sprintf(\"Privileged init container not allowed: %v\", [container.name])\n        }\n```\n\n### Step 3: Apply Constraints\n\n```yaml\n# constraints\u002Frequire-labels.yaml\napiVersion: constraints.gatekeeper.sh\u002Fv1beta1\nkind: K8sRequiredLabels\nmetadata:\n  name: require-team-labels\nspec:\n  enforcementAction: deny\n  match:\n    kinds:\n      - apiGroups: [\"\"]\n        kinds: [\"Namespace\"]\n      - apiGroups: [\"apps\"]\n        kinds: [\"Deployment\", \"StatefulSet\"]\n    excludedNamespaces:\n      - kube-system\n      - gatekeeper-system\n  parameters:\n    labels:\n      - \"team\"\n      - \"environment\"\n      - \"cost-center\"\n\n---\n# constraints\u002Fblock-privileged.yaml\napiVersion: constraints.gatekeeper.sh\u002Fv1beta1\nkind: K8sBlockPrivileged\nmetadata:\n  name: block-privileged-containers\nspec:\n  enforcementAction: deny\n  match:\n    kinds:\n      - apiGroups: [\"\"]\n        kinds: [\"Pod\"]\n      - apiGroups: [\"apps\"]\n        kinds: [\"Deployment\", \"DaemonSet\", \"StatefulSet\"]\n    excludedNamespaces:\n      - kube-system\n```\n\n### Step 4: Test Policies with conftest\n\n```bash\n# Install conftest\nbrew install conftest\n\n# Test Kubernetes manifests against OPA policies locally\nconftest test deployment.yaml --policy policies\u002F --output json\n\n# Test Terraform against OPA policies\nconftest test terraform\u002Fmain.tf --policy policies\u002Fterraform\u002F --parser hcl2\n\n# Test Dockerfiles\nconftest test Dockerfile --policy policies\u002Fdocker\u002F\n```\n\n```rego\n# policies\u002Fkubernetes\u002Fdeny_latest_tag.rego\npackage kubernetes\n\ndeny[msg] {\n  input.kind == \"Deployment\"\n  container := input.spec.template.spec.containers[_]\n  endswith(container.image, \":latest\")\n  msg := sprintf(\"Container %v uses :latest tag. Pin to specific version.\", [container.name])\n}\n\ndeny[msg] {\n  input.kind == \"Deployment\"\n  container := input.spec.template.spec.containers[_]\n  not contains(container.image, \":\")\n  msg := sprintf(\"Container %v has no tag. Pin to specific version.\", [container.name])\n}\n```\n\n### Step 5: Integrate Policy Testing in CI\u002FCD\n\n```yaml\n# .github\u002Fworkflows\u002Fpolicy-test.yml\nname: Policy Validation\n\non:\n  pull_request:\n    paths: ['k8s\u002F**', 'terraform\u002F**', 'policies\u002F**']\n\njobs:\n  conftest:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - name: Install conftest\n        run: |\n          wget -q https:\u002F\u002Fgithub.com\u002Fopen-policy-agent\u002Fconftest\u002Freleases\u002Fdownload\u002Fv0.50.0\u002Fconftest_0.50.0_Linux_x86_64.tar.gz\n          tar xzf conftest_0.50.0_Linux_x86_64.tar.gz\n          sudo mv conftest \u002Fusr\u002Flocal\u002Fbin\u002F\n      - name: Test K8s manifests\n        run: conftest test k8s\u002F**\u002F*.yaml --policy policies\u002Fkubernetes\u002F --output json\n      - name: Test Terraform\n        run: conftest test terraform\u002F*.tf --policy policies\u002Fterraform\u002F --parser hcl2\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| OPA | Open Policy Agent — general-purpose policy engine using Rego language for policy decisions |\n| Rego | OPA's declarative query language for writing policy rules |\n| Gatekeeper | Kubernetes-native OPA integration implementing admission control via ConstraintTemplates |\n| ConstraintTemplate | CRD defining the Rego policy logic and parameters schema for a class of constraints |\n| Constraint | Instance of a ConstraintTemplate with specific parameters and scope (which resources to check) |\n| Admission Controller | Kubernetes component that intercepts API requests before persistence and can allow or deny them |\n| conftest | CLI tool for testing structured data (YAML, JSON, HCL) against OPA policies |\n\n## Tools & Systems\n\n- **Open Policy Agent (OPA)**: General-purpose policy engine for unified policy enforcement\n- **Gatekeeper**: Kubernetes admission controller built on OPA with CRD-based configuration\n- **conftest**: Testing framework for OPA policies against configuration files\n- **Kyverno**: Alternative Kubernetes policy engine using YAML-based policies (no Rego required)\n- **Styra DAS**: Commercial OPA management platform with policy authoring, testing, and distribution\n\n## Common Scenarios\n\n### Scenario: Enforcing Container Security Standards Across Clusters\n\n**Context**: Multiple development teams deploy to shared Kubernetes clusters. Some teams run privileged containers and images without resource limits, causing security and stability issues.\n\n**Approach**:\n1. Deploy Gatekeeper on all clusters via GitOps (Helm chart in a FluxCD repository)\n2. Create ConstraintTemplates for: no privileged containers, required resource limits, required labels, no latest tag\n3. Start with `enforcementAction: warn` to identify violations without blocking deployments\n4. Notify teams of violations and provide a 2-week remediation window\n5. Switch to `enforcementAction: deny` after the remediation period\n6. Add `excludedNamespaces` for kube-system and monitoring namespaces\n\n**Pitfalls**: Deploying Gatekeeper with deny mode immediately can break existing workloads. Always start with warn mode. Overly restrictive policies without exemptions for system namespaces can prevent cluster components from functioning.\n\n## Output Format\n\n```\nOPA Policy Evaluation Report\n==============================\nCluster: production-east\nDate: 2026-02-23\nGatekeeper Version: 3.16.0\n\nCONSTRAINT SUMMARY:\n  K8sRequiredLabels:        12 violations (warn)\n  K8sBlockPrivileged:        0 violations (deny)\n  K8sContainerLimits:        8 violations (deny)\n  K8sBlockLatestTag:         3 violations (deny)\n\nBLOCKED DEPLOYMENTS (deny):\n  [K8sContainerLimits] deployment\u002Fapi-server in ns\u002Fpayments\n    - Container 'api' has no memory limit\n  [K8sBlockLatestTag] deployment\u002Ffrontend in ns\u002Fweb\n    - Container 'nginx' uses :latest tag\n\nAUDIT VIOLATIONS (warn):\n  [K8sRequiredLabels] namespace\u002Fstaging\n    - Missing labels: {cost-center}\n```\n","# Implementing Policy as Code with Open Policy Agent\n\n## When to Use\n\n- When enforcing organizational security policies across Kubernetes clusters programmatically\n- When requiring admission control that blocks non-compliant resources from being created\n- When implementing policy governance that can be version-controlled, tested, and audited\n- When standardizing security rules across multiple clusters and environments\n- When needing a flexible policy engine that extends beyond Kubernetes to APIs and CI\u002FCD\n\n**Do not use** for vulnerability scanning (use Trivy\u002FCheckov), for runtime threat detection (use Falco), or for network policy enforcement (use Kubernetes NetworkPolicy or Calico).\n\n## Prerequisites\n\n- Kubernetes cluster with admin access for Gatekeeper installation\n- Helm for Gatekeeper deployment\n- OPA CLI or conftest for local policy testing\n- Rego knowledge for policy authoring\n\n## Workflow\n\n### Step 1: Install OPA Gatekeeper\n\n```bash\n# Install Gatekeeper via Helm\nhelm repo add gatekeeper https:\u002F\u002Fopen-policy-agent.github.io\u002Fgatekeeper\u002Fcharts\nhelm install gatekeeper gatekeeper\u002Fgatekeeper \\\n  --namespace gatekeeper-system --create-namespace \\\n  --set replicas=3 \\\n  --set audit.replicas=1 \\\n  --set audit.writeToRAMDisk=true\n```\n\n### Step 2: Create Constraint Templates\n\n```yaml\n# templates\u002Fk8s-required-labels.yaml\napiVersion: templates.gatekeeper.sh\u002Fv1\nkind: ConstraintTemplate\nmetadata:\n  name: k8srequiredlabels\nspec:\n  crd:\n    spec:\n      names:\n        kind: K8sRequiredLabels\n      validation:\n        openAPIV3Schema:\n          type: object\n          properties:\n            labels:\n              type: array\n              items:\n                type: string\n  targets:\n    - target: admission.k8s.gatekeeper.sh\n      rego: |\n        package k8srequiredlabels\n        violation[{\"msg\": msg}] {\n          provided := {label | input.review.object.metadata.labels[label]}\n          required := {label | label := input.parameters.labels[_]}\n          missing := required - provided\n          count(missing) > 0\n          msg := sprintf(\"Missing required labels: %v\", [missing])\n        }\n\n---\n# templates\u002Fk8s-container-limits.yaml\napiVersion: templates.gatekeeper.sh\u002Fv1\nkind: ConstraintTemplate\nmetadata:\n  name: k8scontainerlimits\nspec:\n  crd:\n    spec:\n      names:\n        kind: K8sContainerLimits\n      validation:\n        openAPIV3Schema:\n          type: object\n          properties:\n            cpu:\n              type: string\n            memory:\n              type: string\n  targets:\n    - target: admission.k8s.gatekeeper.sh\n      rego: |\n        package k8scontainerlimits\n        violation[{\"msg\": msg}] {\n          container := input.review.object.spec.containers[_]\n          not container.resources.limits.cpu\n          msg := sprintf(\"Container %v has no CPU limit\", [container.name])\n        }\n        violation[{\"msg\": msg}] {\n          container := input.review.object.spec.containers[_]\n          not container.resources.limits.memory\n          msg := sprintf(\"Container %v has no memory limit\", [container.name])\n        }\n\n---\n# templates\u002Fk8s-block-privileged.yaml\napiVersion: templates.gatekeeper.sh\u002Fv1\nkind: ConstraintTemplate\nmetadata:\n  name: k8sblockprivileged\nspec:\n  crd:\n    spec:\n      names:\n        kind: K8sBlockPrivileged\n  targets:\n    - target: admission.k8s.gatekeeper.sh\n      rego: |\n        package k8sblockprivileged\n        violation[{\"msg\": msg}] {\n          container := input.review.object.spec.containers[_]\n          container.securityContext.privileged == true\n          msg := sprintf(\"Privileged container not allowed: %v\", [container.name])\n        }\n        violation[{\"msg\": msg}] {\n          container := input.review.object.spec.initContainers[_]\n          container.securityContext.privileged == true\n          msg := sprintf(\"Privileged init container not allowed: %v\", [container.name])\n        }\n```\n\n### Step 3: Apply Constraints\n\n```yaml\n# constraints\u002Frequire-labels.yaml\napiVersion: constraints.gatekeeper.sh\u002Fv1beta1\nkind: K8sRequiredLabels\nmetadata:\n  name: require-team-labels\nspec:\n  enforcementAction: deny\n  match:\n    kinds:\n      - apiGroups: [\"\"]\n        kinds: [\"Namespace\"]\n      - apiGroups: [\"apps\"]\n        kinds: [\"Deployment\", \"StatefulSet\"]\n    excludedNamespaces:\n      - kube-system\n      - gatekeeper-system\n  parameters:\n    labels:\n      - \"team\"\n      - \"environment\"\n      - \"cost-center\"\n\n---\n# constraints\u002Fblock-privileged.yaml\napiVersion: constraints.gatekeeper.sh\u002Fv1beta1\nkind: K8sBlockPrivileged\nmetadata:\n  name: block-privileged-containers\nspec:\n  enforcementAction: deny\n  match:\n    kinds:\n      - apiGroups: [\"\"]\n        kinds: [\"Pod\"]\n      - apiGroups: [\"apps\"]\n        kinds: [\"Deployment\", \"DaemonSet\", \"StatefulSet\"]\n    excludedNamespaces:\n      - kube-system\n```\n\n### Step 4: Test Policies with conftest\n\n```bash\n# Install conftest\nbrew install conftest\n\n# Test Kubernetes manifests against OPA policies locally\nconftest test deployment.yaml --policy policies\u002F --output json\n\n# Test Terraform against OPA policies\nconftest test terraform\u002Fmain.tf --policy policies\u002Fterraform\u002F --parser hcl2\n\n# Test Dockerfiles\nconftest test Dockerfile --policy policies\u002Fdocker\u002F\n```\n\n```rego\n# policies\u002Fkubernetes\u002Fdeny_latest_tag.rego\npackage kubernetes\n\ndeny[msg] {\n  input.kind == \"Deployment\"\n  container := input.spec.template.spec.containers[_]\n  endswith(container.image, \":latest\")\n  msg := sprintf(\"Container %v uses :latest tag. Pin to specific version.\", [container.name])\n}\n\ndeny[msg] {\n  input.kind == \"Deployment\"\n  container := input.spec.template.spec.containers[_]\n  not contains(container.image, \":\")\n  msg := sprintf(\"Container %v has no tag. Pin to specific version.\", [container.name])\n}\n```\n\n### Step 5: Integrate Policy Testing in CI\u002FCD\n\n```yaml\n# .github\u002Fworkflows\u002Fpolicy-test.yml\nname: Policy Validation\n\non:\n  pull_request:\n    paths: ['k8s\u002F**', 'terraform\u002F**', 'policies\u002F**']\n\njobs:\n  conftest:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - name: Install conftest\n        run: |\n          wget -q https:\u002F\u002Fgithub.com\u002Fopen-policy-agent\u002Fconftest\u002Freleases\u002Fdownload\u002Fv0.50.0\u002Fconftest_0.50.0_Linux_x86_64.tar.gz\n          tar xzf conftest_0.50.0_Linux_x86_64.tar.gz\n          sudo mv conftest \u002Fusr\u002Flocal\u002Fbin\u002F\n      - name: Test K8s manifests\n        run: conftest test k8s\u002F**\u002F*.yaml --policy policies\u002Fkubernetes\u002F --output json\n      - name: Test Terraform\n        run: conftest test terraform\u002F*.tf --policy policies\u002Fterraform\u002F --parser hcl2\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| OPA | Open Policy Agent — general-purpose policy engine using Rego language for policy decisions |\n| Rego | OPA's declarative query language for writing policy rules |\n| Gatekeeper | Kubernetes-native OPA integration implementing admission control via ConstraintTemplates |\n| ConstraintTemplate | CRD defining the Rego policy logic and parameters schema for a class of constraints |\n| Constraint | Instance of a ConstraintTemplate with specific parameters and scope (which resources to check) |\n| Admission Controller | Kubernetes component that intercepts API requests before persistence and can allow or deny them |\n| conftest | CLI tool for testing structured data (YAML, JSON, HCL) against OPA policies |\n\n## Tools & Systems\n\n- **Open Policy Agent (OPA)**: General-purpose policy engine for unified policy enforcement\n- **Gatekeeper**: Kubernetes admission controller built on OPA with CRD-based configuration\n- **conftest**: Testing framework for OPA policies against configuration files\n- **Kyverno**: Alternative Kubernetes policy engine using YAML-based policies (no Rego required)\n- **Styra DAS**: Commercial OPA management platform with policy authoring, testing, and distribution\n\n## Common Scenarios\n\n### Scenario: Enforcing Container Security Standards Across Clusters\n\n**Context**: Multiple development teams deploy to shared Kubernetes clusters. Some teams run privileged containers and images without resource limits, causing security and stability issues.\n\n**Approach**:\n1. Deploy Gatekeeper on all clusters via GitOps (Helm chart in a FluxCD repository)\n2. Create ConstraintTemplates for: no privileged containers, required resource limits, required labels, no latest tag\n3. Start with `enforcementAction: warn` to identify violations without blocking deployments\n4. Notify teams of violations and provide a 2-week remediation window\n5. Switch to `enforcementAction: deny` after the remediation period\n6. Add `excludedNamespaces` for kube-system and monitoring namespaces\n\n**Pitfalls**: Deploying Gatekeeper with deny mode immediately can break existing workloads. Always start with warn mode. Overly restrictive policies without exemptions for system namespaces can prevent cluster components from functioning.\n\n## Output Format\n\n```\nOPA Policy Evaluation Report\n==============================\nCluster: production-east\nDate: 2026-02-23\nGatekeeper Version: 3.16.0\n\nCONSTRAINT SUMMARY:\n  K8sRequiredLabels:        12 violations (warn)\n  K8sBlockPrivileged:        0 violations (deny)\n  K8sContainerLimits:        8 violations (deny)\n  K8sBlockLatestTag:         3 violations (deny)\n\nBLOCKED DEPLOYMENTS (deny):\n  [K8sContainerLimits] deployment\u002Fapi-server in ns\u002Fpayments\n    - Container 'api' has no memory limit\n  [K8sBlockLatestTag] deployment\u002Ffrontend in ns\u002Fweb\n    - Container 'nginx' uses :latest tag\n\nAUDIT VIOLATIONS (warn):\n  [K8sRequiredLabels] namespace\u002Fstaging\n    - Missing labels: {cost-center}\n```\n",{"name":5,"tags":25,"author":33,"domain":34,"license":15,"version":35,"subdomain":26,"description":36},[26,27,28,29,30,31,32],"devsecops","cicd","opa","gatekeeper","policy-as-code","kubernetes","secure-sdlc","mahipal","cybersecurity","1.0.0","This skill covers implementing Open Policy Agent (OPA) and Gatekeeper for policy-as-code enforcement in Kubernetes and CI\u002FCD pipelines. It addresses writing Rego policies, deploying OPA Gatekeeper as a Kubernetes admission controller, testing policies in development, and integrating policy evaluation into deployment pipelines.\n","main","c2b1fdccc779e99ac814e55fb69ca8d71215dd0f","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection","https:\u002F\u002Fgithub.com\u002FSamuelChien","http:\u002F\u002Fsamuelchien.com\u002F","2026-05-26 08:27:14",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add SamuelChien\u002Fmega-skills-collection --skill implementing-policy-as-code-with-open-policy-agent",{"tool":49,"command":50},"bunx","bunx skills add SamuelChien\u002Fmega-skills-collection --skill implementing-policy-as-code-with-open-policy-agent",{"tool":52,"command":53},"pnpm","pnpm dlx skills add SamuelChien\u002Fmega-skills-collection --skill implementing-policy-as-code-with-open-policy-agent","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fimplementing-policy-as-code-with-open-policy-agent\u002FSKILL.md",true,[57,63,67,73,77,81,87],{"path":58,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":61,"sourceHtmlUrl":62},"assets\u002Ftemplate.md","ASSET","资产文件",1833,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fimplementing-policy-as-code-with-open-policy-agent\u002Fassets\u002Ftemplate.md",{"path":64,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":66,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Fapi-reference.md","REFERENCE","参考文档",4139,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fimplementing-policy-as-code-with-open-policy-agent\u002Freferences\u002Fapi-reference.md",{"path":74,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Fstandards.md",1177,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fimplementing-policy-as-code-with-open-policy-agent\u002Freferences\u002Fstandards.md",{"path":78,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fworkflows.md",1911,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fimplementing-policy-as-code-with-open-policy-agent\u002Freferences\u002Fworkflows.md",{"path":82,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":85,"sourceHtmlUrl":86},"scripts\u002Fagent.py","SCRIPT","脚本",9534,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fimplementing-policy-as-code-with-open-policy-agent\u002Fscripts\u002Fagent.py",{"path":88,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":89,"sourceHtmlUrl":90},"scripts\u002Fprocess.py",5954,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fimplementing-policy-as-code-with-open-policy-agent\u002Fscripts\u002Fprocess.py",[92,100,107,114,121,128],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":96,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":20},"01M76R4WZQZAXGGXMQCA0FZ716","zustand-store-ts","Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state\u002Faction separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.","MIT","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzustand-store-ts\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":96,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":20},"01M76R4T9KENDH7FENGZQHBW4G","zustand-store-creator","Zustand Store Creator - Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":96,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":20},"01M76R3YWN84B7SANJ52X799ZE","zero-trust-config-helper","Zero Trust Config Helper - Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":96,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":20},"01M76R3HNSV2AEYSKHM915GJ58","zapier-integration-helper","Zapier Integration Helper - Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":20},"01M76R3DJSKAT4FA7DV4BF3GCE","zai-cli","Execute z.AI CLI providing vision, search, reader, and GitHub exploration via CLI and MCP.\nUse when user needs image\u002Fvideo analysis, OCR, UI-to-code conversion, error diagnosis,\nreal-time web search, web page to markdown extraction, or GitHub code exploration.\nTrigger with phrases like \"analyze this image\", \"search the web for\", \"read this page\",\n\"explore this repo\", or \"use zai\". Requires Z_AI_API_KEY.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzai-cli\u002FSKILL.md",[],[],{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":96,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":20},"01M76R2KAM699XE9AJVAWE4H2E","yt-research","Research competitor YouTube channels, niches, and trending topics for your content strategy.\nUse this skill whenever the user says \"research channels\", \"analyze competitors\", \"find trending topics\",\n\"niche analysis\", \"competitive research\", \"what are other creators doing\", \"scrape YouTube channels\",\nor wants to understand the competitive landscape for a specific tool or topic area. Use when working with yt research. Trigger with 'yt', 'research'.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fyt-research\u002FSKILL.md",[],[]]