Ai Safety Governance Expert logo

Ai Safety Governance Expert

Community
roedyrustam
ai-safety-governance-expert

AI safety, guardrails (NeMo, Llama Guard), bias audit, EU AI Act / Keamanan AI, guardrail (NeMo, Llama Guard), dan tata kelola AI.

Overview

Publisherroedyrustam
Repositoryvibes-plug
Skill nameai-safety-governance-expert
Stars
117
Forks
27
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by roedyrustam on GitHub. Read the source before you install it.

Installation

Install the Ai Safety Governance Expert AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/roedyrustam/vibes-plug/tree/main/skills/ai-safety-governance-expert
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/roedyrustam/vibes-plug.git /tmp/vibes-plug
mkdir -p .claude/skills
cp -r /tmp/vibes-plug/skills/ai-safety-governance-expert .claude/skills/ai-safety-governance-expert
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ai Safety Governance Expert in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ai Safety Governance Expert on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ai Safety Governance Expert is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

AI Safety, Governance, and Responsible AI Expert

English | Bahasa Indonesia


English

Orchestration & Integration

  • Prompt Defense & Firewalls: prompt-injection-firewall, ai-prompt-engineering-expert
  • Red Teaming & Security: autonomous-red-teamer, zero-trust-secret-vault
  • Compliance & Privacy: compliance-gdpr-privacy-expert, formal-spec-z3-verifier
  • Model Evaluation & Memory: ai-llm-integration-expert, session-memory-manager, agentic-memory-architect
  • Lifecycle & Hardening: zero-to-prod-orchestrator, production-ready-hardener, anti-slop, brainstorming

1. Constitutional AI Enforcement

Define constitutional rules as structured guardrails for all AI operations. Implement policies at multiple interception points: pre-generation, post-generation, and retrieval.

Principles & Configuration

  • Embed constitution directly into system prompts.
  • Implement explicit Colang 2.0 flows for conversational state management.
  • Abort sequences when user prompts violate strict constitutional principles.
yaml
# NeMo Guardrails configuration example (config.yml)
models:
  - type: main
    engine: google
    model: gemini-4-argon # Availability Fallback: degrades to gemini-3.8-flash
  - type: fallback
    engine: google
    model: gemini-3.8-flash

rails:
  input:
    flows:
      - check_jailbreak
      - check_topic_restriction
  output:
    flows:
      - check_hallucination
      - check_toxicity

instructions:
  - type: general
    content: |
      You are a helpful, respectful, and honest assistant.
      Always prioritize safety, avoid giving harmful advice, and maintain neutrality.

2. Runtime Safety Guardrails / Pembatasan Keamanan Saat Berjalan

Implement layered defense mechanisms to intercept unsafe input and redact sensitive output. Utilize state-of-the-art moderation models such as Llama Guard 3.

Layered Defense Architecture

  1. System Prompt: Set boundaries and behavior guidelines.
  2. Input Filter: Scan for prompt injection, jailbreaks, and restricted topics (PII, hate speech).
  3. Model Generation: Generate response using the core LLM.
  4. Output Filter: Redact PII, filter toxicity, and enforce factuality checking.
  5. Delivery: Send safe response to the user.
typescript
// Multi-layer guardrail pipeline in TypeScript
import { LlamaGuard } from '@safety/llama-guard';
import { PIIRedactor } from '@safety/redactor';
import { LLMService } from './llm';

export async function generateSafeResponse(prompt: string): Promise<string> {
  // Layer 2: Input Guardrail
  const inputCheck = await LlamaGuard.checkPrompt(prompt);
  if (!inputCheck.isSafe) {
    throw new Error(`Unsafe prompt detected: ${inputCheck.violationCategory}`);
  }

  // Layer 3: Model Generation
  const rawResponse = await LLMService.generate(prompt);

  // Layer 4: Output Guardrails
  const outputCheck = await LlamaGuard.checkResponse(prompt, rawResponse);
  if (!outputCheck.isSafe) {
    throw new Error('Unsafe response blocked by output guardrails.');
  }

  const redactedResponse = PIIRedactor.redact(rawResponse);
  
  // Layer 5: Delivery
  return redactedResponse;
}

3. Hallucination Detection & Grounding / Deteksi Halusinasi & Grounding

Employ grounding techniques and retrieval-augmented verification to minimize hallucinations. Implement real-time factuality metrics on generated text.

Citation Verification Pipeline

  • Claim Extraction: Extract factual claims from the response.
  • Source Matching: Retrieve grounding documents for each claim.
  • Confidence Scoring: Calculate factuality using NLI (Natural Language Inference) models.
python
# Hallucination detection with SelfCheckGPT principles
from selfcheckgpt.modeling_selfcheck import SelfCheckNLI
import spacy

nlp = spacy.load("en_core_web_sm")
selfcheck_nli = SelfCheckNLI(device="cpu") # use cuda if available

def detect_hallucination(response_text, context_documents):
    sentences = [sent.text for sent in nlp(response_text).sents]
    
    # Calculate NLI scores against provided context
    nli_scores = selfcheck_nli.predict(
        sentences=sentences,
        sampled_passages=[context_documents] * len(sentences)
    )
    
    threshold = 0.85
    hallucinated_sentences = [
        sentences[i] for i, score in enumerate(nli_scores) if score < threshold
    ]
    
    return {
        "is_grounded": len(hallucinated_sentences) == 0,
        "hallucinations": hallucinated_sentences
    }

4. Automated Bias Auditing / Audit Bias Otomatis

Continuously monitor AI systems for demographic parity, equal opportunity, and equalized odds.

Audit Pipeline

  1. Test Suite: Run standardized prompts targeting various demographics.
  2. Metric Collection: Evaluate embeddings and outputs for representational and allocative harms.
  3. Report: Aggregate fairness metrics into actionable dashboards.
  4. Remediation: Apply fairness constraints during fine-tuning.
python
# Bias audit script using fairlearn
from fairlearn.metrics import demographic_parity_difference
from sklearn.metrics import accuracy_score
import pandas as pd

def audit_model_fairness(predictions, true_labels, sensitive_features):
    df = pd.DataFrame({
        'y_true': true_labels,
        'y_pred': predictions,
        'sensitive_feature': sensitive_features
    })
    
    dp_diff = demographic_parity_difference(
        y_true=df['y_true'], 
        y_pred=df['y_pred'], 
        sensitive_features=df['sensitive_feature']
    )
    
    overall_accuracy = accuracy_score(df['y_true'], df['y_pred'])
    
    print(f"Demographic Parity Difference: {dp_diff:.4f}")
    print(f"Overall Accuracy: {overall_accuracy:.4f}")
    
    if dp_diff > 0.1:
        print("WARNING: Significant demographic parity violation detected.")

5. AI Model Cards & Documentation / Kartu Model & Dokumentasi AI

Maintain standardized Model Cards for transparency and accountability, automatically generated from evaluation results.

Required Model Card Sections

  • Intended Use: Primary use cases and out-of-scope applications.
  • Limitations: Known failure modes and biases.
  • Training Data: Overview of pre-training and fine-tuning datasets, including opt-out mechanisms.
  • Performance Metrics: Standardized benchmark scores (MMLU, HumanEval) and fairness metrics.
  • Ethical Considerations: Mitigation strategies for potential harms.

6. AI Compliance Matrix / Matriks Kepatuhan AI

Map AI deployments against global regulatory frameworks. Implement automated risk classification checks.

Frameworks & Controls

  • EU AI Act: Classify systems as Unacceptable (prohibited), High Risk (strict requirements), Limited (transparency required), or Minimal.
  • NIST AI RMF: Implement Govern, Map, Measure, and Manage functions.
  • GDPR Article 22: Ensure human-in-the-loop (HITL) for automated decision-making.
  • SOC2: Implement AI-specific data isolation and auditing controls.
python
# Risk classification decision tree
def classify_eu_ai_act_risk(system_purpose, employs_biometrics, affects_safety):
    if system_purpose in ["social_scoring", "subliminal_manipulation"]:
        return "UNACCEPTABLE_RISK"
    
    if employs_biometrics or affects_safety or system_purpose in ["employment", "education", "credit_scoring"]:
        return "HIGH_RISK"
        
    if system_purpose in ["chatbot", "deepfake", "emotion_recognition"]:
        return "LIMITED_RISK"
        
    return "MINIMAL_RISK"

7. Content Provenance & Watermarking / Asal Konten & Watermarking

Ensure transparency in AI-generated outputs by embedding provenance data.

Implementation Strategies

  • C2PA Credentials: Attach cryptographic content credentials to AI-generated images and audio.
  • Invisible Text Watermarking: Alter token probabilities during generation (e.g., SynthID text) to embed a detectable signature.
  • Clear Disclosures: Always present visible labels indicating content is AI-generated, especially for synthetic media and bots.

Sovereign Execution, Token Efficiency & Invariants

DimensionSovereign Mandate & Deterministic Contract
Frontier Model CascadeHigh Fast / High (Grok 4.7 High Fast, Claude Sonnet 5.5 High, Gemini 4 Pro)
Availability FallbackGemini 4 Pro -> Gemini 3.8 Flash; Claude Opus 5.5 -> Claude Opus 4.6; Grok 4.7 -> Grok 4.6 High Fast (Zero unhandled missing-model errors)
KV-Cache & Token ProtocolPin static instructions & schemas at prompt prefix (kv-cache-prefix-optimizer); pass surgical CONTEXT_MAP.md slices (<250 tokens/call) during Swarm Fan-Out
SaaT CLI & MCP DispatchCLI: vibes skill exec ai-safety-governance-expert <audit|eval|verify|generate|blueprint> / MCP: vibes_skill_dispatch, vibes_critic_validate, vibes_self_heal, vibes_eval_sandbox, vibes_verify_invariants
NFR & Anti-Slop InvariantsZero OWASP Top 10 vectors, 0 hardcoded secrets, >= 90% branch coverage on domain logic, 0 Anti-Slop violations; 100% complete zero-placeholder output verified via node scripts/check-anti-slop.js --strict


Bahasa Indonesia

Integrasi Orkestrasi

  • Pertahanan Prompt & Firewall: prompt-injection-firewall, ai-prompt-engineering-expert
  • Red Teaming & Keamanan: autonomous-red-teamer, zero-trust-secret-vault
  • Kepatuhan & Privasi: compliance-gdpr-privacy-expert, formal-spec-z3-verifier
  • Evaluasi Model & Memori: ai-llm-integration-expert, session-memory-manager, agentic-memory-architect
  • Siklus Hidup & Pengerasan: zero-to-prod-orchestrator, production-ready-hardener, anti-slop, brainstorming

Deskripsi

Panduan komprehensif tingkat produksi untuk Keamanan AI, Tata Kelola (Governance), dan AI Bertanggung Jawab (Responsible AI). Menerapkan penegakan AI Konstitusional, pengamanan waktu jalan (runtime guardrails via NeMo Guardrails dan Llama Guard), audit bias otomatis, deteksi halusinasi, kepatuhan regulasi EU AI Act / NIST RMF, kartu model terstandarisasi, dan tanda air bukti asal konten (C2PA / SynthID).

7 Pilar Tata Kelola AI Produksi

  1. Penegakan AI Konstitusional: Definisikan aturan konstitusi sebagai guardrail terstruktur untuk seluruh operasi AI pada tahap pra-generasi, pasca-generasi, dan retrieval.
  2. Runtime Safety Guardrails: Terapkan pertahanan berlapis (filter input jailbreak/injeksi prompt, mitigasi toksisitas, dan redaksi PII).
  3. Deteksi Halusinasi: Hitung skor faktualitas menggunakan model Natural Language Inference (NLI) dan verifikasi bukti rujukan konteks.
  4. Audit Bias Otomatis: Pantau perbedaan paritas demografis (demographic parity difference) dan metrik keadilan secara berkala.
  5. Kartu Model AI (Model Cards): Dokumentasikan batasan model, kasus penggunaan yang sah, dataset pelatihan, dan metrik etika secara transparan.
  6. Matriks Kepatuhan Global: Klasifikasikan tingkat risiko sistem AI berdasarkan kerangka regulasi EU AI Act (Risiko Tidak Diterima, Tinggi, Terbatas, Minimal), NIST AI RMF, dan Pasal 22 GDPR.
  7. Asal Konten & Watermarking: Sematkan kredensial kriptografis C2PA pada media sintetis dan terapkan penandaan SynthID agar keluaran AI transparan serta dapat diaudit.

Matriks Eksekusi Berdaulat, Efisiensi Token & Invarian

DimensiMandat Berdaulat & Kontrak Deterministik
Kaskade Model FrontierHigh Fast / High (Grok 4.7 High Fast, Claude Sonnet 5.5 High, Gemini 4 Pro)
Invarian Fallback KetersediaanGemini 4 Pro -> Gemini 3.8 Flash; Claude Opus 5.5 -> Claude Opus 4.6; Grok 4.7 -> Grok 4.6 High Fast (Bebas gagal saat model belum tersedia/kuota penuh)
Protokol Hemat Token & KV-CacheKunci instruksi & skema statis di prefix awal (kv-cache-prefix-optimizer); kirim potongan CONTEXT_MAP.md (<250 token/panggilan) saat Fan-Out
Eksekusi SaaT CLI & MCPCLI: vibes skill exec ai-safety-governance-expert <audit|eval|verify|generate|blueprint> / MCP: vibes_skill_dispatch, vibes_critic_validate, vibes_self_heal, vibes_eval_sandbox, vibes_verify_invariants
Invarian NFR & Anti-SlopNol celah OWASP Top 10, 0 kredensial hardcoded, cakupan pengujian >= 90% pada logika domain, 0 pelanggaran Anti-Slop; kode 100% tuntas tanpa placeholder diverifikasi melalui node scripts/check-anti-slop.js --strict

Frequently asked questions

What does the Ai Safety Governance Expert AI skill do?

AI safety, guardrails (NeMo, Llama Guard), bias audit, EU AI Act / Keamanan AI, guardrail (NeMo, Llama Guard), dan tata kelola AI.

Why use Ai Safety Governance Expert on TypingMind?

Because you install it once and use it with any model. Ai Safety Governance Expert is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ai Safety Governance Expert in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/roedyrustam/vibes-plug/tree/main/skills/ai-safety-governance-expert. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Ai Safety Governance Expert?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ai Safety Governance Expert?

As many as you like. As long as a model supports skills, you can use Ai Safety Governance Expert with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ai Safety Governance Expert AI skill free?

Yes. It is published on GitHub by roedyrustam under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇