K-Dense-AI/scientific-agent-skills / skills/protocolsio-integration
protocolsio-integration
VerifiedReads, validates, and safely exports protocols.io data with current official REST/MCP contracts, or creates non-executing mutation plans. The bundled client makes bounded official-host GET requests only with explicit --execute. Use only for tasks explicitly targeting protocols.io or an exact protocols.io protocol version.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 13.2 KB |
| assets/protocol-snapshot.schema.json | config | 4.2 KB |
| references/additional_features.md | markdown | 9.8 KB |
| references/authentication.md | markdown | 6.4 KB |
| references/discussions.md | markdown | 6.4 KB |
| references/file_manager.md | markdown | 10.2 KB |
| references/protocols_api.md | markdown | 11.3 KB |
| references/workspaces.md | markdown | 8.1 KB |
| scripts/__init__.py | script | 76 B |
| scripts/_common.py | script | 19.8 KB |
| scripts/pagination_helper.py | script | 7.5 KB |
| scripts/plan_write_request.py | script | 23.0 KB |
| scripts/protocols_read.py | script | 15.6 KB |
| scripts/validate_auth_config.py | script | 3.4 KB |
| scripts/validate_protocol_json.py | script | 12.1 KB |
scripts/validate_auth_config.py
View on GitHub#!/usr/bin/env python3
"""Validate named protocols.io credential/configuration variables locally."""
from __future__ import annotations
import argparse
import os
from typing import Mapping, Sequence
try:
from ._common import (
ACCESS_TOKEN_ENV,
DEFAULT_ORIGIN,
SafetyError,
credential_status,
emit_error,
emit_json,
validate_origin,
)
except ImportError:
from _common import ( # type: ignore
ACCESS_TOKEN_ENV,
DEFAULT_ORIGIN,
SafetyError,
credential_status,
emit_error,
emit_json,
validate_origin,
)
def build_parser() -> argparse.ArgumentParser:
parser = argparse.ArgumentParser(
description=(
"Validate protocols.io named environment variables without network "
"access, .env loading, or secret output."
)
)
parser.add_argument(
"--origin",
default=DEFAULT_ORIGIN,
help="HTTPS API origin (default: %(default)s).",
)
parser.add_argument(
"--tenant-origin",
help=("Optional organization/VPC origin such as https://tenant.protocols.io."),
)
parser.add_argument(
"--require",
choices=("none", "read"),
default="none",
help="Credential readiness level to require (default: %(default)s).",
)
return parser
def _validate_secret_value(name: str, value: str | None) -> None:
if value is None:
return
if (
not value
or any(character.isspace() or ord(character) < 32 for character in value)
or "\x7f" in value
):
raise SafetyError(
f"{name} must be non-empty and contain no whitespace or control characters"
)
def validate_config(
*,
origin: str,
tenant_origin: str | None,
requirement: str,
environ: Mapping[str, str],
) -> tuple[int, dict[str, object]]:
normalized_origin = validate_origin(origin)
normalized_tenant = (
validate_origin(tenant_origin, allow_tenant=True) if tenant_origin else None
)
_validate_secret_value(ACCESS_TOKEN_ENV, environ.get(ACCESS_TOKEN_ENV))
status = credential_status(environ)
readiness = {
"none": True,
"read": bool(status["rest_bearer_ready"]),
}
problems: list[str] = []
if not readiness[requirement]:
problems.append(f"credential requirement {requirement!r} is not satisfied")
report: dict[str, object] = {
"ok": not problems,
"network_accessed": False,
"dotenv_loaded": False,
"origin": normalized_origin,
"tenant_origin": normalized_tenant,
"requirement": requirement,
"credential_status": status,
"problems": problems,
"security": {
"values_emitted": False,
"accepted_secret_sources": [ACCESS_TOKEN_ENV],
"command_line_secrets_accepted": False,
"oauth_secrets_consumed": False,
},
}
return (0 if report["ok"] else 3), report
def main(argv: Sequence[str] | None = None) -> int:
args = build_parser().parse_args(argv)
try:
code, report = validate_config(
origin=args.origin,
tenant_origin=args.tenant_origin,
requirement=args.require,
environ=os.environ,
)
emit_json(report)
return code
except (SafetyError, ValueError) as exc:
return emit_error(exc)
if __name__ == "__main__":
raise SystemExit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |