d3js-1-use-proper-margins-convention

Sub-skill of d3js: 1. Use Proper Margins Convention (+3).

5 stars

Best use case

d3js-1-use-proper-margins-convention is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Sub-skill of d3js: 1. Use Proper Margins Convention (+3).

Teams using d3js-1-use-proper-margins-convention should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/1-use-proper-margins-convention/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/_archive/data/visualization/d3js/1-use-proper-margins-convention/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/1-use-proper-margins-convention/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How d3js-1-use-proper-margins-convention Compares

Feature / Agentd3js-1-use-proper-margins-conventionStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Sub-skill of d3js: 1. Use Proper Margins Convention (+3).

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 1. Use Proper Margins Convention (+3)

## 1. Use Proper Margins Convention

```javascript
const margin = { top: 20, right: 20, bottom: 30, left: 40 };
const width = 960 - margin.left - margin.right;
const height = 500 - margin.top - margin.bottom;

const svg = d3.select('body').append('svg')
  .attr('width', width + margin.left + margin.right)
  .attr('height', height + margin.top + margin.bottom)
  .append('g')
  .attr('transform', `translate(${margin.left},${margin.top})`);
```


## 2. Use Method Chaining

```javascript
// Good - readable chaining
svg.selectAll('circle')
  .data(data)
  .enter()
  .append('circle')
  .attr('cx', d => xScale(d.x))
  .attr('cy', d => yScale(d.y))
  .attr('r', 5);
```


## 3. Separate Data from Presentation

```javascript
// Load data separately
d3.json('../data/data.json').then(data => {
  visualize(data);
});

function visualize(data) {
  // Visualization logic here
}
```


## 4. Use Responsive Design

```javascript
// Make chart responsive
function resize() {
  const container = d3.select('#chart').node();
  const width = container.getBoundingClientRect().width;

  xScale.range([0, width]);
  svg.attr('width', width);
  // Update chart elements
}

window.addEventListener('resize', resize);
```

Related Skills

tax-consultant-nnn-property

5
from vamseeachanta/workspace-hub

Comprehensive tax consultant for C-Corp owners of NNN (triple-net) commercial properties. Covers Form 1120 preparation, cost segregation, depreciation schedules, NOL management, 1099 reconciliation, tenant reimbursement tracking, and IRS compliance.

mermaid-conventions

5
from vamseeachanta/workspace-hub

Conventions for creating consistent Mermaid diagrams including decision node layout, edge ordering, and flowchart direction rules.

agent-teams-subagent-startup-convention

5
from vamseeachanta/workspace-hub

Sub-skill of agent-teams: Subagent startup convention (+2).

orcawave-damping-sweep-damping-related-properties

5
from vamseeachanta/workspace-hub

Sub-skill of orcawave-damping-sweep: Damping-Related Properties.

orcawave-aqwa-benchmark-convention-differences

5
from vamseeachanta/workspace-hub

Sub-skill of orcawave-aqwa-benchmark: Convention Differences (+3).

orcawave-analysis-orcawave-api-properties-reference

5
from vamseeachanta/workspace-hub

Sub-skill of orcawave-analysis: OrcaWave API Properties Reference.

orcawave-analysis-diffractionspec-specyml-conventions

5
from vamseeachanta/workspace-hub

Sub-skill of orcawave-analysis: DiffractionSpec Conventions (spec.yml to OrcaWave).

orcaflex-vessel-setup-vessel-properties-yaml

5
from vamseeachanta/workspace-hub

Sub-skill of orcaflex-vessel-setup: Vessel Properties YAML.

orcaflex-line-wizard-common-line-setup-properties

5
from vamseeachanta/workspace-hub

Sub-skill of orcaflex-line-wizard: Common Line Setup Properties (+1).

freecad-automation-extract-geometry-properties

5
from vamseeachanta/workspace-hub

Sub-skill of freecad-automation: Extract Geometry Properties (+2).

gitbook-1-structure-content-properly

5
from vamseeachanta/workspace-hub

Sub-skill of gitbook: 1. Structure Content Properly (+3).

d3js-1-data-binding

5
from vamseeachanta/workspace-hub

Sub-skill of d3js: 1. Data Binding (+3).