d3js-1-use-proper-margins-convention
Sub-skill of d3js: 1. Use Proper Margins Convention (+3).
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
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/1-use-proper-margins-convention/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How d3js-1-use-proper-margins-convention Compares
| Feature / Agent | d3js-1-use-proper-margins-convention | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/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
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
Conventions for creating consistent Mermaid diagrams including decision node layout, edge ordering, and flowchart direction rules.
agent-teams-subagent-startup-convention
Sub-skill of agent-teams: Subagent startup convention (+2).
orcawave-damping-sweep-damping-related-properties
Sub-skill of orcawave-damping-sweep: Damping-Related Properties.
orcawave-aqwa-benchmark-convention-differences
Sub-skill of orcawave-aqwa-benchmark: Convention Differences (+3).
orcawave-analysis-orcawave-api-properties-reference
Sub-skill of orcawave-analysis: OrcaWave API Properties Reference.
orcawave-analysis-diffractionspec-specyml-conventions
Sub-skill of orcawave-analysis: DiffractionSpec Conventions (spec.yml to OrcaWave).
orcaflex-vessel-setup-vessel-properties-yaml
Sub-skill of orcaflex-vessel-setup: Vessel Properties YAML.
orcaflex-line-wizard-common-line-setup-properties
Sub-skill of orcaflex-line-wizard: Common Line Setup Properties (+1).
freecad-automation-extract-geometry-properties
Sub-skill of freecad-automation: Extract Geometry Properties (+2).
gitbook-1-structure-content-properly
Sub-skill of gitbook: 1. Structure Content Properly (+3).
d3js-1-data-binding
Sub-skill of d3js: 1. Data Binding (+3).