← Back to Skills Marketplace
kolect-info

Kolect Sentiment

by Kolect-info · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
129
Downloads
2
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install kolect-sentiment
Description
Query, check freshness, check pending requests, or request new sentiment updates on-chain for supported symbols and time windows via the Kolect Sentiment Fee...
README (SKILL.md)

\r ---\r name: kolect-sentiment-feed\r description: Use this skill when the user wants to read, explain, or interact with the Kolect Sentiment Feed contract on Base, including querying sentiment, checking freshness, checking pending requests, and requesting new on-chain sentiment updates for supported symbols and time windows.\r ---\r \r

Kolect Sentiment Feed\r

\r

Purpose\r

\r Use this skill for the Kolect Sentiment Feed contract, an on-chain sentiment oracle on Base.\r \r It stores normalized sentiment for supported (symbol, timeWindow) pairs through a request–response flow:\r \r

  1. User requests an update on-chain\r
  2. Off-chain publisher fetches sentiment from Kolect API\r
  3. Publisher fulfills the request on-chain with normalized BPS data\r \r Use this skill when the user wants to:\r
  • read the latest sentiment\r
  • check freshness\r
  • check pending request state\r
  • request a new update\r
  • understand how the oracle works\r
  • integrate the feed into AI agents, trading, dashboards, or DeFi logic\r \r ---\r \r

Contract\r

\r

  • Project: Kolect\r
  • Module: Kolect Sentiment Feed\r
  • Version: v1.0.0\r
  • Network: Base\r
  • Address: 0x6783ab3c181976e8c960c43d711aaf4da79a4e4b\r
  • Explorer: https://base.blockscout.com/address/0x6783ab3c181976e8c960c43d711aaf4da79a4e4b\r
  • Website: https://kolect.info\r
  • Twitter/X: https://x.com/kolect_info\r \r ---\r \r

Interaction Types\r

\r

Read-only calls\r

Usually used to inspect current state:\r

  • getLatest(symbol, timeWindow)\r
  • isFresh(symbol, timeWindow)\r
  • hasPendingRequest(symbol, timeWindow)\r \r These are normally read calls and do not require the contract request fee.\r \r

Write call\r

Used to initiate a new oracle update:\r

  • requestUpdate(symbol, timeWindow)\r \r This is not a free read. It is a state-changing transaction:\r
  • requires gas\r
  • may require request fee payment\r \r Never present requestUpdate as a free data read.\r \r ---\r \r

Data Model\r

\r Each feed is identified by:\r

  • symbol\r
  • timeWindow\r \r Examples:\r
  • (BTC, 1d)\r
  • (ETH, 1h)\r \r Each feed stores:\r
  • negativeBps\r
  • neutralBps\r
  • positiveBps\r
  • dataTimestamp — off-chain data time\r
  • updatedAt — on-chain fulfillment time\r \r

Invariant\r

\r negativeBps + neutralBps + positiveBps = 10000\r \r Interpretation:\r

  • 10000 = 100.00%\r
  • 2500 = 25.00%\r
  • 5000 = 50.00%\r \r Always preserve and validate this rule.\r \r ---\r \r

Core Workflow\r

\r

1. Request update\r

Function:\r requestUpdate(string symbol, string timeWindow)\r \r Should only succeed if:\r

  • symbol is supported\r
  • time window is supported\r
  • feed is not already fresh\r
  • no pending request exists\r
  • required fee is paid\r \r

2. Off-chain processing\r

Publisher:\r

  • listens to UpdateRequested\r
  • fetches sentiment from Kolect API\r
  • normalizes result into BPS\r \r

3. Fulfillment\r

Function:\r fulfillRequest(requestId, negativeBps, neutralBps, positiveBps, dataTimestamp)\r \r Result:\r

  • data stored on-chain\r
  • request marked fulfilled\r
  • event emitted\r \r

4. Failure\r

Function:\r failRequest(requestId, errorCode)\r \r Used when data retrieval or fulfillment fails.\r \r ---\r \r

Functions\r

\r

User\r

  • requestUpdate(string symbol, string timeWindow)\r \r

View\r

  • getLatest(symbol, timeWindow)\r
  • isFresh(symbol, timeWindow)\r
  • hasPendingRequest(symbol, timeWindow)\r \r

Publisher\r

  • fulfillRequest(...)\r
  • failRequest(...)\r \r

Owner\r

  • setSupportedSymbol(...)\r
  • setSupportedTimeWindow(...)\r
  • setUpdateInterval(...)\r
  • setRequestFee(...)\r
  • withdrawFees(...)\r \r Do not imply ordinary users can call owner-only functions.\r \r ---\r \r

Events\r

\r Important indexing events:\r

  • UpdateRequested\r
  • RequestFulfilled\r
  • RequestFailed\r \r Use these when discussing dashboards, Dune, subgraphs, analytics, or automation.\r \r ---\r \r

Decision Logic\r

\r

If the user wants the latest sentiment\r

  1. Identify symbol and timeWindow\r
  2. Use getLatest(symbol, timeWindow)\r
  3. Present:\r
    • negative / neutral / positive\r
    • both BPS and %\r
    • dataTimestamp\r
    • updatedAt\r \r

If the user asks whether an update is needed\r

  1. Check isFresh(symbol, timeWindow)\r
  2. If fresh, explain no update may be needed\r
  3. If stale, explain requestUpdate may be appropriate\r \r

If the user wants to request an update\r

  1. Identify symbol and timeWindow\r
  2. Check:\r
    • supported symbol\r
    • supported time window\r
    • not fresh\r
    • no pending request\r
    • fee requirement\r
  3. Then prepare or describe requestUpdate(symbol, timeWindow)\r \r

If the user asks why a request may fail\r

Likely reasons:\r

  • unsupported symbol\r
  • unsupported time window\r
  • feed already fresh\r
  • request already pending\r
  • fee missing\r
  • publisher fulfillment failure\r \r ---\r \r

Output Format\r

\r When reporting sentiment, use:\r \r

  • Symbol: BTC\r
  • Time window: 1d\r
  • Negative: 2300 BPS (23.00%)\r
  • Neutral: 4100 BPS (41.00%)\r
  • Positive: 3600 BPS (36.00%)\r
  • Data timestamp: [off-chain time]\r
  • Updated on-chain at: [on-chain time]\r
  • Fresh: [true/false if known]\r
  • Pending request: [true/false if known]\r \r Do not report only raw integers unless explicitly requested.\r \r ---\r \r

Validation Rules\r

\r Whenever sentiment data is given, validate:\r

  1. negativeBps + neutralBps + positiveBps == 10000\r
  2. each value is non-negative\r
  3. dataTimestamp = off-chain data time\r
  4. updatedAt = on-chain update time\r \r If the sum is not 10000, flag it as invalid.\r \r ---\r \r

Python Examples\r

\r

Read latest sentiment\r

\r

from web3 import Web3\r
\r
RPC_URL = "https://mainnet.base.org"\r
CONTRACT_ADDRESS = Web3.to_checksum_address("0x6783ab3c181976e8c960c43d711aaf4da79a4e4b")\r
\r
ABI = [\r
    {\r
        "inputs": [\r
            {"internalType": "string", "name": "symbol", "type": "string"},\r
            {"internalType": "string", "name": "timeWindow", "type": "string"}\r
        ],\r
        "name": "getLatest",\r
        "outputs": [\r
            {"internalType": "uint256", "name": "negativeBps", "type": "uint256"},\r
            {"internalType": "uint256", "name": "neutralBps", "type": "uint256"},\r
            {"internalType": "uint256", "name": "positiveBps", "type": "uint256"},\r
            {"internalType": "uint256", "name": "dataTimestamp", "type": "uint256"},\r
            {"internalType": "uint256", "name": "updatedAt", "type": "uint256"}\r
        ],\r
        "stateMutability": "view",\r
        "type": "function"\r
    }\r
]\r
\r
w3 = Web3(Web3.HTTPProvider(RPC_URL))\r
contract = w3.eth.contract(address=CONTRACT_ADDRESS, abi=ABI)\r
\r
symbol = "BTC"\r
time_window = "1d"\r
\r
negative_bps, neutral_bps, positive_bps, data_timestamp, updated_at = (\r
    contract.functions.getLatest(symbol, time_window).call()\r
)\r
\r
print("Negative:", negative_bps, f"({negative_bps / 100:.2f}%)")\r
print("Neutral:", neutral_bps, f"({neutral_bps / 100:.2f}%)")\r
print("Positive:", positive_bps, f"({positive_bps / 100:.2f}%)")\r
print("Data timestamp:", data_timestamp)\r
print("Updated at:", updated_at)\r
````\r
\r
### Check freshness and pending request\r
\r
```python\r
from web3 import Web3\r
\r
RPC_URL = "https://mainnet.base.org"\r
CONTRACT_ADDRESS = Web3.to_checksum_address("0x6783ab3c181976e8c960c43d711aaf4da79a4e4b")\r
\r
ABI = [\r
    {\r
        "inputs": [\r
            {"internalType": "string", "name": "symbol", "type": "string"},\r
            {"internalType": "string", "name": "timeWindow", "type": "string"}\r
        ],\r
        "name": "isFresh",\r
        "outputs": [{"internalType": "bool", "name": "", "type": "bool"}],\r
        "stateMutability": "view",\r
        "type": "function"\r
    },\r
    {\r
        "inputs": [\r
            {"internalType": "string", "name": "symbol", "type": "string"},\r
            {"internalType": "string", "name": "timeWindow", "type": "string"}\r
        ],\r
        "name": "hasPendingRequest",\r
        "outputs": [{"internalType": "bool", "name": "", "type": "bool"}],\r
        "stateMutability": "view",\r
        "type": "function"\r
    }\r
]\r
\r
w3 = Web3(Web3.HTTPProvider(RPC_URL))\r
contract = w3.eth.contract(address=CONTRACT_ADDRESS, abi=ABI)\r
\r
symbol = "ETH"\r
time_window = "1h"\r
\r
fresh = contract.functions.isFresh(symbol, time_window).call()\r
pending = contract.functions.hasPendingRequest(symbol, time_window).call()\r
\r
print("Fresh:", fresh)\r
print("Pending:", pending)\r
```\r
\r
### Request an update\r
\r
```python\r
from web3 import Web3\r
\r
RPC_URL = "https://mainnet.base.org"\r
PRIVATE_KEY = "YOUR_PRIVATE_KEY"\r
ACCOUNT = "YOUR_WALLET_ADDRESS"\r
CONTRACT_ADDRESS = Web3.to_checksum_address("0x6783ab3c181976e8c960c43d711aaf4da79a4e4b")\r
\r
ABI = [\r
    {\r
        "inputs": [\r
            {"internalType": "string", "name": "symbol", "type": "string"},\r
            {"internalType": "string", "name": "timeWindow", "type": "string"}\r
        ],\r
        "name": "requestUpdate",\r
        "outputs": [],\r
        "stateMutability": "payable",\r
        "type": "function"\r
    }\r
]\r
\r
w3 = Web3(Web3.HTTPProvider(RPC_URL))\r
contract = w3.eth.contract(address=CONTRACT_ADDRESS, abi=ABI)\r
\r
symbol = "BTC"\r
time_window = "1d"\r
request_fee_wei = 0  # replace with actual fee if needed\r
\r
tx = contract.functions.requestUpdate(symbol, time_window).build_transaction({\r
    "from": ACCOUNT,\r
    "nonce": w3.eth.get_transaction_count(ACCOUNT),\r
    "value": request_fee_wei,\r
    "gas": 300000,\r
    "gasPrice": w3.eth.gas_price,\r
    "chainId": 8453\r
})\r
\r
signed_tx = w3.eth.account.sign_transaction(tx, PRIVATE_KEY)\r
tx_hash = w3.eth.send_raw_transaction(signed_tx.raw_transaction)\r
print(tx_hash.hex())\r
```\r
\r
---\r
\r
## JavaScript Examples\r
\r
### Read latest sentiment\r
\r
```javascript\r
import { ethers } from "ethers";\r
\r
const RPC_URL = "https://mainnet.base.org";\r
const CONTRACT_ADDRESS = "0x6783ab3c181976e8c960c43d711aaf4da79a4e4b";\r
\r
const ABI = [\r
  "function getLatest(string symbol, string timeWindow) view returns (uint256 negativeBps, uint256 neutralBps, uint256 positiveBps, uint256 dataTimestamp, uint256 updatedAt)"\r
];\r
\r
const provider = new ethers.JsonRpcProvider(RPC_URL);\r
const contract = new ethers.Contract(CONTRACT_ADDRESS, ABI, provider);\r
\r
const result = await contract.getLatest("BTC", "1d");\r
\r
console.log(Number(result.negativeBps), Number(result.neutralBps), Number(result.positiveBps));\r
console.log(Number(result.dataTimestamp), Number(result.updatedAt));\r
```\r
\r
### Check freshness and pending request\r
\r
```javascript\r
import { ethers } from "ethers";\r
\r
const RPC_URL = "https://mainnet.base.org";\r
const CONTRACT_ADDRESS = "0x6783ab3c181976e8c960c43d711aaf4da79a4e4b";\r
\r
const ABI = [\r
  "function isFresh(string symbol, string timeWindow) view returns (bool)",\r
  "function hasPendingRequest(string symbol, string timeWindow) view returns (bool)"\r
];\r
\r
const provider = new ethers.JsonRpcProvider(RPC_URL);\r
const contract = new ethers.Contract(CONTRACT_ADDRESS, ABI, provider);\r
\r
const fresh = await contract.isFresh("ETH", "1h");\r
const pending = await contract.hasPendingRequest("ETH", "1h");\r
\r
console.log("Fresh:", fresh);\r
console.log("Pending:", pending);\r
```\r
\r
### Request an update\r
\r
```javascript\r
import { ethers } from "ethers";\r
\r
const RPC_URL = "https://mainnet.base.org";\r
const PRIVATE_KEY = "YOUR_PRIVATE_KEY";\r
const CONTRACT_ADDRESS = "0x6783ab3c181976e8c960c43d711aaf4da79a4e4b";\r
\r
const ABI = [\r
  "function requestUpdate(string symbol, string timeWindow) payable"\r
];\r
\r
const provider = new ethers.JsonRpcProvider(RPC_URL);\r
const wallet = new ethers.Wallet(PRIVATE_KEY, provider);\r
const contract = new ethers.Contract(CONTRACT_ADDRESS, ABI, wallet);\r
\r
const tx = await contract.requestUpdate("BTC", "1d", {\r
  value: 0n // replace with actual request fee if needed\r
});\r
\r
console.log(tx.hash);\r
await tx.wait();\r
```\r
\r
---\r
\r
## Recommended Agent Behavior\r
\r
An AI agent should use the feed in this order:\r
\r
1. `getLatest(symbol, timeWindow)`\r
2. validate BPS values\r
3. `isFresh(symbol, timeWindow)`\r
4. `hasPendingRequest(symbol, timeWindow)`\r
5. only if stale and no pending request exists:\r
\r
   * prepare or send `requestUpdate(symbol, timeWindow)`\r
\r
Recommended phrasing:\r
\r
> The Kolect Sentiment Feed lets the agent consume verifiable on-chain sentiment state. The agent should first read current state, then verify freshness, and only request a new update when needed.\r
\r
---\r
\r
## Action Policy\r
\r
* If the user asks for explanation only, explain the contract and do not push a write transaction.\r
* If the user asks for current sentiment, prefer read calls first.\r
* If the user asks to refresh, explain freshness and pending checks before suggesting `requestUpdate`.\r
* Never suggest owner-only functions unless the user is explicitly admin/operator.\r
* Never imply all interactions are free. Read calls are usually free from the contract side; write calls need gas and may need request fee.\r
\r
---\r
\r
## Safe Assumptions\r
\r
The model may assume:\r
\r
* this contract is on Base\r
* the address above is the intended deployment\r
* sentiment is normalized in BPS\r
\r
The model must not assume without checking:\r
\r
* supported symbols\r
* supported time windows\r
* current request fee\r
* current update interval\r
* whether a feed is fresh right now\r
* whether a request is pending right now\r
\r
These are dynamic contract states.\r
\r
---\r
\r
## Anti-Patterns\r
\r
Do not:\r
\r
* confuse BPS with percentages\r
* say the contract computes sentiment internally\r
* describe the feed as auto-updating on a timer\r
* assume request fee is zero\r
* merge `dataTimestamp` and `updatedAt`\r
* assume all symbols and time windows are supported by default\r
* tell the user to call `requestUpdate` before checking freshness and pending state\r
\r
---\r
\r
## Minimal Cheat Sheet\r
\r
**Chain:** Base\r
**Contract:** `0x6783ab3c181976e8c960c43d711aaf4da79a4e4b`\r
\r
**Main user action**\r
\r
* `requestUpdate(symbol, timeWindow)`\r
\r
**Main read functions**\r
\r
* `getLatest(symbol, timeWindow)`\r
* `isFresh(symbol, timeWindow)`\r
* `hasPendingRequest(symbol, timeWindow)`\r
\r
**Publisher functions**\r
\r
* `fulfillRequest(...)`\r
* `failRequest(...)`\r
\r
**Key events**\r
\r
* `UpdateRequested`\r
* `RequestFulfilled`\r
* `RequestFailed`\r
\r
**Core invariant**\r
\r
* `negativeBps + neutralBps + positiveBps = 10000`\r
\r
Usage Guidance
This skill is a documentation-only guide to interacting with the Kolect Sentiment Feed contract. Before using it: verify the contract address and repository source (the README points to a GitHub repo), and understand that initiating requestUpdate requires an on-chain transaction — you will need to sign and pay gas/fees with your wallet (the skill does not and should not ask for private keys). Do not paste private keys or secrets into the agent; if you plan to run the provided code, run it in a controlled environment and connect a wallet or signer you control. Finally, treat sentiment data as informational (not financial advice) and validate BPS invariants as the skill recommends.
Capability Analysis
Type: OpenClaw Skill Name: kolect-sentiment Version: 1.0.0 The kolect-sentiment skill bundle provides instructions and code examples for an AI agent to interact with the Kolect Sentiment Feed oracle on the Base network (0x6783ab3c181976e8c960c43d711aaf4da79a4e4b). The SKILL.md file contains well-structured guidance, including safety policies that prevent the agent from misrepresenting transaction costs or attempting unauthorized owner-only functions. No indicators of data exfiltration, malicious execution, or prompt injection were found.
Capability Assessment
Purpose & Capability
The skill's name and description match the SKILL.md content: it documents read and write interactions with a specific on-chain sentiment oracle (contract address, explorer, network). It does not request unrelated resources or credentials.
Instruction Scope
SKILL.md stays on-topic: describes methods (getLatest, isFresh, hasPendingRequest, requestUpdate), event usage, validation rules, and example code (web3). It does not instruct reading arbitrary files, exfiltrating data, or contacting unknown endpoints. Note: requesting updates implies sending an on-chain transaction (gas + fee) and therefore requires a signer/wallet outside the skill; the skill does not attempt to manage or request private keys.
Install Mechanism
No install spec or code files are included; the README points to a GitHub repository/raw URL as an optional source for the SKILL.md, which is normal for documentation-only skills. There is no archive download or arbitrary executable install step.
Credentials
The skill declares no required environment variables, secrets, or config paths. The content uses a public RPC URL example and a public contract address; nothing in the files asks for unrelated credentials or tokens.
Persistence & Privilege
The skill is not marked always:true and has no install actions that grant it persistent system privileges. It is instruction-only and does not modify other skills or global agent settings.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install kolect-sentiment
  3. After installation, invoke the skill by name or use /kolect-sentiment
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of Kolect sentiment skill. Provides a structured interface for AI agents to access and act on on-chain sentiment data. Features: - read normalized sentiment (BPS) - check freshness and pending state - request updates on demand Part of the Kolect ecosystem: https://kolect.info https://x.com/kolect_info
Metadata
Slug kolect-sentiment
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Kolect Sentiment?

Query, check freshness, check pending requests, or request new sentiment updates on-chain for supported symbols and time windows via the Kolect Sentiment Fee... It is an AI Agent Skill for Claude Code / OpenClaw, with 129 downloads so far.

How do I install Kolect Sentiment?

Run "/install kolect-sentiment" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Kolect Sentiment free?

Yes, Kolect Sentiment is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Kolect Sentiment support?

Kolect Sentiment is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Kolect Sentiment?

It is built and maintained by Kolect-info (@kolect-info); the current version is v1.0.0.

💬 Comments