mastermind-profile
Mastermind profile — view and edit the operator profile, and show any user's activity, completion rate and token usage.
- License 许可
- Apache-2.0
- 所属仓库
- monoes/monomind
- 最近更新
- 2026-11-14
- Stars
- ★ 23
- Forks
- 2
01 前言 Front Matter
- name
- mastermind-profile
- pick
- low
- type
- domain-skill
- description
- Mastermind profile — view and edit the operator profile, and show any user's activity, completion rate and token usage.
- default_mode
- confirm
03 SKILL.md 正文
Mastermind Profile
This skill is invoked directly via /mastermind-profile.
Inputs
brain_context: BRAIN CONTEXT block (injected by command, or loaded below if standalone)action: show | edit | view-user | statsuser_id: user id to view (for view-user/stats; defaults to current operator)org_name: org context for per-org stats (optional)display_name: new display name (for edit)email: new email (for edit)theme: light | dark | system (for edit)caller: command | master
Step 0 — Brain Load (standalone only)
If caller is not "command", load brain context following mastermind-protocol/SKILL.md Brain Load Procedure with namespace: ops.
Step 1 — Load Profile File
profileFile=".monomind/operator-profile.json"
[ ! -f "$profileFile" ] && cat > "$profileFile" <<'EOF'
{
"id": "local-operator",
"displayName": "Operator",
"email": "",
"theme": "system",
"avatarInitials": "OP",
"keyboardShortcutsEnabled": true,
"createdAt": null
}
EOF
Step 2 — Execute Action
show (default)
echo "OPERATOR PROFILE"
echo "────────────────────────────────────────────────────────"
jq -r '
" ID: \(.id // "local-operator")",
" Display name: \(.displayName // "(not set)")",
" Email: \(.email // "(not set)")",
" Theme: \(.theme // "system")",
" Initials: \(.avatarInitials // "OP")",
" Shortcuts: \(.keyboardShortcutsEnabled // true)",
" Created: \(.createdAt // "(local)")"
' "$profileFile"
echo ""
echo " To edit: --action edit --display-name 'New Name'"
echo " To view stats: --action stats"
edit
if [ -z "$display_name" ] && [ -z "$email" ] && [ -z "$theme" ]; then
echo "ERROR: Provide at least one of: --display-name, --email, --theme (light|dark|system)"
exit 1
fi
case "${theme:-}" in
light|dark|system|"") : ;;
*) echo "ERROR: --theme must be light, dark, or system"; exit 1 ;;
esac
tmp="${profileFile}.tmp"
jq \
--arg name "${display_name:-}" \
--arg email "${email:-}" \
--arg theme "${theme:-}" \
'(if $name != "" then .displayName = $name else . end) |
(if $email != "" then .email = $email else . end) |
(if $theme != "" then .theme = $theme else . end) |
(if $name != "" then .avatarInitials = ($name | split(" ") |
map(select(length > 0) | .[0:1] | ascii_upcase) | .[0:2] | join(""))
else . end)' \
"$profileFile" > "$tmp" && mv "$tmp" "$profileFile"
echo "Profile updated."
jq -r '" displayName: \(.displayName) email: \(.email) theme: \(.theme)"' "$profileFile"
view-user
targetId="${user_id:-local-operator}"
echo "USER PROFILE — $targetId"
echo "────────────────────────────────────────────────────────"
# Try to find in instance access file
accessFile=".monomind/instance-access.json"
if [ -f "$accessFile" ]; then
userEntry=$(jq -r --arg id "$targetId" '(.users // [])[] | select(.id == $id)' "$accessFile")
if [ -n "$userEntry" ]; then
isAdmin=$(echo "$userEntry" | jq -r '.isInstanceAdmin // false')
orgs=$(echo "$userEntry" | jq -r '(.companyAccess // []) | join(", ")')
echo " ID: $targetId"
echo " Instance admin: $isAdmin"
echo " Org access: ${orgs:-(none)}"
else
echo " ID: $targetId"
echo " (User not found in instance access registry)"
fi
else
echo " ID: $targetId (no instance access file)"
fi
echo ""
echo " For activity stats: --action stats --user-id $targetId"
stats
targetId="${user_id:-local-operator}"
echo "ACTIVITY STATS — $targetId"
echo "────────────────────────────────────────────────────────"
# Scan activity files for user contributions
totalRuns=0; successRuns=0; totalInputTokens=0; totalOutputTokens=0
for actFile in data/mastermind-sessions.json .monomind/orgs/*-activity.jsonl; do
[ -f "$actFile" ] || continue
if echo "$actFile" | grep -q "\.jsonl$"; then
cnt=$(grep -c "\"actorId\":\"${targetId}\"" "$actFile" 2>/dev/null || echo 0)
succ=$(grep "\"actorId\":\"${targetId}\"" "$actFile" 2>/dev/null | grep -c '"outcome":"success"' || echo 0)
totalRuns=$((totalRuns + cnt))
successRuns=$((successRuns + succ))
fi
done
# Per-org if org_name set
if [ -n "$org_name" ]; then
issuesFile=".monomind/orgs/${org_name}-issues.json"
if [ -f "$issuesFile" ]; then
assigned=$(jq --arg uid "$targetId" '[(.issues // [])[] | select(.assigneeId == $uid)] | length' "$issuesFile")
echo " Issues assigned (org $org_name): $assigned"
fi
fi
completionRate=0
[ "$totalRuns" -gt 0 ] && completionRate=$((successRuns * 100 / totalRuns))
echo " Total runs tracked: $totalRuns"
echo " Successful runs: $successRuns"
echo " Completion rate: ${completionRate}%"
echo ""
echo " (Token usage stats require agent run logs with token tracking enabled)"
Step 3 — Return Output
domain: ops
status: complete
action: <action>
user_id: <user_id or local-operator>
Step 4 — Brain Write (standalone only)
If caller is not "command", follow mastermind-protocol/SKILL.md Brain Write Procedure for domain ops.
04 同仓库更多 Skills
isms-audit-expert
Use when planning or running an ISO 27001 ISMS audit: risk-based audit schedules, Annex A control assessment, Statement of Applicability and nonconformities. Auditor-side procedures, versus compliance-auditor, which is org role guidance across SOC 2, HIPAA and PCI-DSS.
instrument-data-to-allotrope
Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis. Supports auto-detection of instrument types. Outputs include full ASM JSON, flattened CSV for easy import, and exportable Python code for data engineers. Common triggers include converting instrument files, standardizing lab data, preparing data for upload to LIMS/ELN systems, or generating parser code for production pipelines.
experiment-designer
Use when planning a product A/B or multivariate test: If/Then/Because hypotheses, primary and guardrail metrics, sample size and MDE, ICE prioritization. For logging and reproducing ML runs use experiment-tracker; for scientific study design use experimental-design.
digest
Generate a daily or weekly digest of activity across all connected sources. Use when catching up after time away, starting the day and wanting a summary of mentions and action items, or reviewing a week's decisions and document updates grouped by project.
design-critique
Get structured design feedback on usability, hierarchy, and consistency. Trigger with "review this design", "critique this mockup", "what do you think of this screen?", or when sharing a Figma link or screenshot for feedback at any stage from exploration to final polish.
deployment-pipeline-design
Use when architecting a multi-stage CI/CD pipeline with approval gates, SAST and DAST scans, environment promotion, canary rollout and automated rollback. Design-level; for concrete Dockerfile and health check patterns use deployment-patterns.