Skip to main content
ClaudeWave
Skill3.3k repo starsupdated 11d ago

tres-settings-management

Manage Organization Settings and Platform Settings via the TRES MCP GraphQL API. Use when users ask about org settings, platform settings, configuration, feature flags, enable/disable platforms, balance diff, commit strategy, cost basis, ERP, pricing, sync boundaries, or any setting read/write operation. Trigger phrases include "get settings", "show settings", "update settings", "change settings", "enable platform", "disable platform", "balance diff", "commit strategy", "cost basis strategy", "set min sync date", "configure", "turn on", "turn off".

Install in Claude Code
Copy
git clone --depth 1 https://github.com/anthropics/claude-plugins-community /tmp/tres-settings-management && cp -r /tmp/tres-settings-management/tres-finance-plugin/skills/tres-settings-management ~/.claude/skills/tres-settings-management
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# TRES MCP - Organization & Platform Settings

## How This Skill Works

This skill lets users view and modify configuration for their TRES Finance organization and individual blockchain/exchange platforms. There are two levels:

- **Organization Settings** — Apply to the entire org: how cost basis is calculated, which features are enabled, ERP behavior, pricing sources, commit scheduling, etc.
- **Platform Settings** — Apply per-platform (e.g., Ethereum, Arbitrum) and optionally per-wallet: commit strategy, sync date boundaries, balance diff, asset filtering, etc.

---

## Ground Rules

### 1. Always Start by Identifying the Org

Before doing anything, confirm which organization the user is connected to:

```graphql
query { admin { orgName } }
```

Tell the user: "You're connected to **{orgName}**."

### 2. Read Before Write

Before any mutation, ALWAYS fetch the current value of the setting(s) being changed. Show a clear before/after comparison.

### 3. Mutations Require Explicit Approval

Before executing ANY mutation, you MUST:
1. Show a clear summary table with **Setting**, **Current Value**, and **New Value**
2. Explicitly ask: "Shall I apply these changes to **{orgName}**?"
3. Only proceed after the user confirms
4. After execution, show the confirmed result from the mutation response

### 4. Warn About High-Risk Changes

Flag these settings as potentially dangerous and add a warning:
- `costBasisStrategy` — Changing mid-period can cause recalculations across the entire org
- `disableAutoCommit` — Stops all automatic data processing
- `skipCostBasis` — Disables cost basis entirely
- `commitStrategy: SKIP_ALL` — Fully disables a platform's data pipeline
- `enableMultiEntity` — Structural change, hard to reverse
- `allowShort` — Enables short positions in cost basis

### 5. Use Schema Introspection for Field Discovery

Do NOT rely on hardcoded field lists. Use the MCP `introspect` tool to discover available fields and their types dynamically:

- `introspect("OrganizationSettingsObjectType")` — all readable org settings
- `introspect("setOrganizationSettings")` — all writable org settings with descriptions
- `introspect("PlatformSettingsObjectType")` — all readable platform settings
- `introspect("setPlatformSettings")` — all writable platform settings with descriptions

When a user asks "what can I configure?" or you need to verify a field name or enum values, introspect first.

---

## Setting Categories (use when users ask vaguely)

If the user says "show me the settings" without specifics, offer these categories with plain-language explanations:

| Category | What It Controls |
|---|---|
| **Cost Basis** | How gains/losses are calculated (FIFO, LIFO, etc.), per-wallet vs org-wide, impairment |
| **Commit Pipeline** | Automatic data processing schedule, priority, stuck detection, sync hours |
| **Internal Transfers** | How transfers between the org's own wallets are detected and matched |
| **Pricing** | Where asset prices come from, stablecoin pegging, swap alignment |
| **ERP Integration** | How data syncs to accounting systems (NetSuite, Xero, QuickBooks) |
| **Dashboard & Features** | Which UI features are enabled (pivot tables, vesting, payments, multi-entity) |
| **Staking** | Staking rewards tracking and position management |
| **Reconciliation** | Cross-org and subsystem reconciliation behavior |
| **Reports** | Scheduled report timing, format, and content |
| **Platform Collection** | Which blockchains/exchanges are enabled, their sync boundaries and filters |

---

## Reading Organization Settings

### Query Structure

```graphql
query {
  admin {
    orgName
    organizationSettings {
      # include only the fields relevant to the user's question
    }
  }
}
```

- Organization is resolved from the auth token — no org ID needed
- Never request all fields at once — pick the category relevant to the question
- Use `introspect("OrganizationSettingsObjectType")` to discover available fields if needed

### Nested Fields (must expand sub-fields when querying)

These fields return objects/lists, not scalars. Always include their sub-fields:

| Field | Sub-fields | What It Is |
|---|---|---|
| `peggedStableCoinsToFiat` | `assetName`, `currency` | Stablecoins treated as equivalent to fiat |
| `pricingApiSourcePerAsset` | `assetName`, `pricingApiSource` | Custom pricing source per asset |
| `netsuiteCurrencySymbolToInternalId` | `currency`, `internalId` | NetSuite currency mapping |
| `simpleMatchingStrategies` | `beforeRange`, `afterRange` | Reconciliation time windows |
| `proofOfFunds` | `organizationName` | Proof of funds client config |

### Additional Admin Fields

The `admin` query also provides:
- `orgName` — the organization's display name
- `disabledPlatforms` — quick list of platforms with collection fully disabled
- `auth0Connections` — available SSO login methods

---

## Writing Organization Settings

### Mutation Structure

Uses patch semantics — only include the fields you want to change. Everything else stays as-is.

```graphql
mutation {
  setOrganizationSettings(
    costBasisStrategy: FIFO
  ) {
    organizationSettings {
      costBasisStrategy
    }
  }
}
```

Use `introspect("setOrganizationSettings")` to discover all mutable fields, their types, and descriptions.

### Workflow for Changing Org Settings

1. **Read** the current values of the setting(s) being changed
2. **Show** the user a before/after comparison table
3. **Warn** if any high-risk settings are involved
4. **Ask** for approval
5. **Execute** the mutation
6. **Confirm** by showing the returned values

---

## Reading Platform Settings

### Query Structure (top-level query)

Returns only platforms/accounts with explicit overrides. Platforms using all defaults won't appear.

```graphql
query {
  platformSettings(platform: ETHEREUM) {
    results {
      settingsId
      platform
      internalAccountId
      platformSettings {
        commitStrategy
        calculateBalanceDiff
        minLastS
eli5Skill

Explain a topic like I'm a 5 year old. Use when the user types /eli5 <topic> or asks for a dead-simple picture explainer of how something works.

quickdesignSkill

Use the `quickdesign` CLI to generate AI media — UGC promo videos, image edits, product creatives, video upscales — through Seedance, Kling, Sora2, Nano Banana, and GPT Image. Invoke this skill whenever the user asks for a talking-avatar video, multi-segment ad / promo / explainer, image edit (object swap, angle change, state change), product photoshoot, or video upscale via QuickDesign.

testdino-auditSkill

Use only when the user explicitly asks for a TestDino audit of Playwright automated test code. Routes through the audit tools the TestDino MCP server exposes (get_audit_report + submit_audit_report, or the legacy test_audit). For generic code review or non-Playwright targets, do a normal review instead.

testdino-healthSkill

Use when the user wants to check TestDino connection status, validate their PAT, discover available organizations and projects, or find the right projectId. Always call this first when the project context is ambiguous before any other TestDino tool.

testdino-manual-runsSkill

Use when the user wants to manage a manual execution run or update case-level results inside a run — listing runs, creating runs for a release, inspecting a run, assigning cases, or marking case results (passed/failed/blocked/skipped/retest/untested). Accepts counter-style IDs like RUN-12 and TC-156.

testdino-manual-testsSkill

Use when the user wants to create, update, or browse manual QA test cases and suites in TestDino — not execution runs. Covers list_manual_test_suites, list_manual_test_cases, get_manual_test_case, create_manual_test_case, update_manual_test_case, create_manual_test_suite.

testdino-releasesSkill

Use when the user wants to browse, inspect, create, or update releases/milestones in a TestDino project. Covers list_releases, get_release, create_release, and update_release. Accepts counter-style IDs like MS-12.

testdino-runsSkill

Use when the user wants to inspect automated test runs, list failed or flaky tests, debug a failing testcase with historical context, or filter runs by branch, commit, author, environment, browser, status, or tags. Includes list_testruns, get_run_details, list_testcase, get_testcase_details, and debug_testcase.