How do you say in German something that is easy to do. I have found "ein Klacks" in my dictionary, but I have a great doubt about the meaning of the word and how to use it.
"Klacks" is indeed a very colloquial term, referring to the ease of completing a task. However, "Klacks" is very rarely used on its own in contrast to "piece of cake".
Answering to the question:
"Do you think you can do that for me?" - "Piece of cake!"
You wouldn't say just "Klacks" but rather:
"Glaubst du, du könntest das für mich machen?" - "Kinderspiel!"
in a sentence:
"Das ist ein Kinderspiel." - ('That is as easy as a game for little children.')
or you could also say
"Das schaffe ich mit links!" - ('That is something I'd even manage using my left hand')
- (which is historically referring to the fact, that most people were educated using their right hand to fulfill all sorts of tasks)
There are some more expressions used in this context, but those are probably the most common ones.
Here's a list: http://www.dict.cc/?s=piece+of+cake
You can say "Das war ein Klacks" if something was easy. You are mostly referring to a task you had to do or will have to do in the future.
Did you manage to learn German? Answer: Sure thing, that was a piece of cake.
Hast du es geschafft Deutsch zu lernen? Antwort: Na klar, das war ein Klacks.
Source: I am German.
Piece of cake! Refers to the easiness of something.
I've done this before, that's gonna be a piece of cake.
I assembled my Ikea furniture alone. That was a piece of cake.
So it seems to always refer to the past. For you don't know if something will be a piece of cake if you have never done it before, unless you are just trying to cheer somebody up.
I'd go with anyone else's suggestions:
Kinderspiel, leichtes Spiel, Klacks.
Used as past tense: Das war ein <>.
Or Das ging wie's Brezelbacken.
Used as future tense: Das wird ein <>.
If you want to say you are optimistic about finishing something quickly you can also say:
"Damit mache(n) ich/wir kurzen Prozess. I.e: We make quick work of it.
I'd like to add that at least where I live (Lower Saxony), "Klacks" is a little outdated. People will understand you, but it's not what a (younger) native speaker would say. In fact, I'm almost 30 years old and I never heard anyone say "Klacks". Here, more common ways to say it would be "kein Problem", "kein Thema" or "kein Ding" (the latter two are more informal and especially used in spoken language). But again, it might be a regional/dialect thing.