indicator-buffer
Assists in implementing BufferList incremental indicators for chain or quote processing.
Install
mkdir -p .claude/skills/indicator-buffer && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/4121" && unzip -o skill.zip -d .claude/skills/indicator-buffer && rm skill.zipInstalls to .claude/skills/indicator-buffer
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Implement BufferList incremental indicators with efficient state management. Use for IIncrementFromChain or IIncrementFromBar implementations. Covers interface selection, constructor patterns, and BufferListTestBase testing requirements.Key capabilities
- →Implement incremental indicators
- →Manage state for IIncrementFromChain or IIncrementFromBar
- →Verify series parity in tests
- →Register indicators in the catalog
How it works
The skill provides a framework for developing incremental indicators by inheriting from BufferList, implementing specific interfaces, and using rolling buffers for efficient state management.
Inputs & outputs
When to use indicator-buffer
- →Implement financial indicators
- →Use BufferList for state management
- →Write tests for indicator implementations
About this skill
BufferList indicator development
Interface selection
| Interface | Additional Inputs | Use Case |
|---|---|---|
IIncrementFromChain | IReusable, (DateTime, double) | Chainable single-value indicators |
IIncrementFromBar | (none — only IBar from base) | Requires OHLCV properties |
See references/interface-selection.md for decision tree.
Constructor pattern
The chaining constructor parameter type depends on the interface implemented:
// IIncrementFromChain — chaining ctor takes IReadOnlyList<IReusable>
public class EmaList : BufferList<EmaResult>, IIncrementFromChain, IEma
{
public EmaList(int lookbackPeriods)
{
Ema.Validate(lookbackPeriods);
LookbackPeriods = lookbackPeriods;
_buffer = new Queue<double>(lookbackPeriods);
}
public EmaList(int lookbackPeriods, IReadOnlyList<IReusable> values)
: this(lookbackPeriods) => Add(values);
}
// IIncrementFromBar — chaining ctor takes IReadOnlyList<IBar>
public class AdxList : BufferList<AdxResult>, IIncrementFromBar, IAdx
{
public AdxList(int lookbackPeriods)
{
Adx.Validate(lookbackPeriods);
LookbackPeriods = lookbackPeriods;
}
public AdxList(int lookbackPeriods, IReadOnlyList<IBar> bars)
: this(lookbackPeriods) => Add(bars);
}
Buffer management
_buffer.Update(capacity, value)— standard rolling buffer_buffer.UpdateWithDequeue(capacity, value)— returns dequeued value for sum adjustment
State management
Use Clear() to reset all internal state:
public override void Clear()
{
base.Clear();
_buffer.Clear();
_bufferSum = 0;
}
Testing constraints
- Inherit
BufferListTestBase IIncrementFromChain→ implementITestChainBufferListIIncrementFromBar→ implementITestBarBufferList- Series parity:
bufferResults.IsExactly(seriesResults)
Required implementation
- Source code:
src/**/{IndicatorName}List.csfile exists- Inherits
BufferList<TResult>and implements correct increment interface - Two constructors: primary + chaining via
: this(...) => Add(...); - Uses
BufferListUtilities.Update()orUpdateWithDequeue() -
Clear()resets results and all internal buffers
- Inherits
- Unit testing:
tests/Library/Indicators/**/{IndicatorName}BufferListTests.csexists- Inherits
BufferListTestBaseand implements correct test interface - All required abstract + interface methods implemented
- Verifies equivalence with Series results
- Inherits
- Catalog registration: Registered in
Catalog.Listings.cs - Performance benchmark: Add to
tools/performance/Perf.Buffer.cs - Public documentation: Update
docs/indicators/{IndicatorName}.md - Regression tests: Add to
tests/Library/Indicators/**/{IndicatorName}RegressionTests.cs - Migration guide: Update
docs/migration/v3.mdfor notable and breaking changes from v2
When not to use it
- →When implementing non-incremental indicators
- →When the indicator does not require state management
Prerequisites
Limitations
- →Requires adherence to specific constructor patterns
- →Testing requires implementation of specific test interfaces
How it compares
It enforces a standardized development and testing pattern for incremental indicators, ensuring consistency and performance compared to ad-hoc implementations.
Compared to similar skills
indicator-buffer side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| indicator-buffer (this skill) | 1 | 1mo | No flags | Advanced |
| zod-4 | 12 | 7mo | No flags | Intermediate |
| develop-ai-functions-example | 5 | 6mo | Review | Intermediate |
| agent-implementer-sparc-coder | 1 | 6mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by DaveSkender
View all by DaveSkender →You might also like
zod-4
prowler-cloud
Zod 4 schema validation patterns. Trigger: When creating or updating Zod v4 schemas for validation/parsing (forms, request payloads, adapters), including v3 -> v4 migration patterns.
develop-ai-functions-example
vercel
Develop examples for AI SDK functions. Use when creating, running, or modifying examples under examples/ai-functions/src to validate provider support, demonstrate features, or create test fixtures.
agent-implementer-sparc-coder
ruvnet
Agent skill for implementer-sparc-coder - invoke with $agent-implementer-sparc-coder
perplexity-local-dev-loop
jeremylongshore
Configure Perplexity local development with hot reload and testing. Use when setting up a development environment, configuring test workflows, or establishing a fast iteration cycle with Perplexity. Trigger with phrases like "perplexity dev setup", "perplexity local development", "perplexity dev environment", "develop with perplexity".
add-policy
microsoft
Use when adding, modifying, or reviewing VS Code configuration policies. Covers the full policy lifecycle from registration to export to platform-specific artifacts. Run on ANY change that adds a `policy:` field to a configuration property.
node
dannybrown37
Invoke when the user is writing or debugging TypeScript or JavaScript code, working with Node.js tooling, or asking about ESLint/Prettier configuration.