agentleFS
iblaiiblai/base/skills/agents/iblai-api-agent-safety/SKILL.md

iblai-api-agent-safety

Skill222 starsChanged 12 days agoMITView on GitHub

Configure an ibl.ai agent's moderation and safety systems via the platform API — enable flags, system prompts and responses (saved through the agent settings endpoint) — and review or delete flagged-prompt moderation logs. Use when setting guardrails or auditing flagged content.

  • Reads credentials
  • Sends data out

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Not connected yet? Run /iblai-api-login first to populate IBLAI_ORG, IBLAI_USERNAME, and IBLAI_API_KEY.

    line 26

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

iblai-api-agent-safety

Configure an agent's moderation and safety systems via the API: the moderation and safety enable flags, system prompts, and responses (all saved through the single settings/ endpoint), plus reviewing and deleting flagged-prompt moderation logs. Use when setting guardrails or auditing flagged content. The UI twin is /iblai-vibe-agent-safety.

Auth & conventions

  • Base URL: https://api.iblai.app
  • Header: Authorization: Api-Token $IBLAI_API_KEY on every request.
  • Path vars: {org} = $IBLAI_ORG, {username} = $IBLAI_USERNAME, {mentor} = the agent's unique id (e.g. d17dc729-60fd-4363-81a0-f67d9318b03e).
  • Settings writes go through one endpoint — PUT …/users/{username}/mentors/{mentor}/settings/ (JSON, multipart/form-data or form-encoded) — sending only the changed field(s).
  • Not connected yet? Run /iblai-api-login first to populate IBLAI_ORG, IBLAI_USERNAME, and IBLAI_API_KEY.

Reads

  • GET https://api.iblai.app/dm/api/ai-mentor/orgs/{org}/users/{username}/mentors/{mentor}/settings/ — load moderation/safety prompts, responses, and enable flags.
  • GET https://api.iblai.app/dm/api/ai-mentor/orgs/{org}/users/{username}/moderation-logs/?mentor={mentor}&page={n}&page_size={n}&search={q}&start_time={iso}&end_time={iso}&ordering={field} — list the user messages the Moderation Prompt stopped. It only ever returns Moderation System rows. Rows carry id, prompt, reason (why it was flagged), target_system, date_created and mentor (the agent's numeric id). username={u} filters to the user who was flagged, not the caller. Each row names who was flagged with username, email and user_full_name; the last two are null for a row whose user has since been deleted, which a log row is expected to outlive.
  • GET https://api.iblai.app/dm/api/ai-mentor/orgs/{org}/users/{username}/safety-logs/?mentor={mentor}&page={n}&page_size={n} — the agent replies the Safety Prompt blocked (Safety System rows). Same query parameters and row shape as moderation-logs/; the SDK data layer reads it with useGetSafetyLogsQuery (@iblai/data-layer 1.45.0 or later; @iblai/iblai-js 2.74.1 shipped 1.44.1, without it).

Writes

  • PUT …/users/{username}/mentors/{mentor}/settings/ — update moderation/safety fields (send only changed keys):
    {
      "enable_moderation": "boolean",
      "enable_safety_system": "boolean",
      "moderation_system_prompt": "string",
      "moderation_response": "string",
      "safety_system_prompt": "string",
      "safety_response": "string"
    }
  • DELETE https://api.iblai.app/dm/api/ai-mentor/orgs/{org}/users/{username}/moderation-logs/{id}/ — delete a flagged log (no body); …/safety-logs/{id}/ deletes a safety log. Destructive — confirm with the user first.

Example

Enable the moderation system and set its system prompt and response (only the changed fields are sent):

curl -X PUT \
  "https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mentors/$MENTOR/settings/" \
  -H "Authorization: Api-Token $IBLAI_API_KEY" \
  -F "enable_moderation=true" \
  -F "moderation_system_prompt=Flag any request for medical, legal, or financial advice." \
  -F "moderation_response=I can't help with that. Please consult a licensed professional."

Notes

  • A field left out of the PUT is left unchanged — never resend the whole object.
  • Safety and moderation prompts/responses/flags all persist through the same settings/ endpoint as the rest of the agent's configuration.
  • Each system has its own log: moderation-logs/ for Moderation System catches, safety-logs/ for Safety System catches. Narrow either with search, start_time, and end_time.
  • Deleting a moderation log only removes the audit record — it does not change the agent's safety configuration.
  • The moderation check runs on the user's message before the agent sees it; the safety check runs on the agent's reply. A message caught by moderation is answered with moderation_response, and logged in moderation-logs/ while the agent's save_flagged_prompts is on (the default).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.